|
How To Check Disk Usage In Solaris | ShareTab Tech Point
sharetab.com/tag/how-to-check-disk-usage-in-solari... To view disk free status:
To view the quote of file system: This command displays the file system ownership. # quot /export/home : to summarize a particular file system.
Configuring JBoss to Use With Service Management Facility (SMF)William Pool (Puddle), June 2005
The Solaris 10 OS uses the Service Management Facility (SMF) to handle
services. Traditional means like To take advantage of the SMF in the Solaris 10 OS using JBoss, do the following. Note: Read the scripts and "change" the paths of jboss and your version of jboss accordingly! This does work for JBoss 3.x.x branches too! Create a service manifest file: /var/svc/manifest/network/jboss4.xml This contains the following: <?xml version='1.0'?>
Now create your "Service Method File" in #!/usr/bin/sh Now fix the permissions for the two files created: chown root:bin /lib/svc/method/svc-jboss4 Import the service into the service repository: # svccfg import /var/svc/manifest/network/jboss4.xml Enable the service: # svcadm -v enable jboss Root
1) Edit the /etc/passwd file and change the entry for the root user thus : root:x:0:1:Super-User:/root:/sbin/sh Be very diligent about creating the root users home directory right away and ensure that it is only readable by the root user :
# mkdir /root
# chmod 700 /root
# chown root:root /root
2) If using CSW or Coolstack: Next item is the default PATH for the root user and regular users. You can set this in the files /etc/default/login and /etc/default/su. Please feel free to be pedantic and set PATH and SUPATH in both of those files to something useful thus :
PATH=/opt/csw/bin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ccs/bin
Really you can leave /opt/csw/bin out of there entirely if you want. The software from Blastwave is isolated in /opt/csw and will not interfere with your other software. You can use GNOME from somewhere else if you want. Your users can have there own .profile files that determine that they run JDS if they want. Labels:
configuration -d home-directory-path
groupadd user useradd -d /export/home/fred -m -g user -s /bin/bash -c "Fred Smith" fred cp /etc/nsswitch.dns /etc/nsswitch.conf /etc/resolv.conf -> /etc/inet/resolv.conf domain mtn.co.za svcs -a |grep dns svcadm enable svc:/network/dns/client:default Other
/usr/sadm/bin/smc prodreg Use the following command to enable the service : # svcadm enable svc:/network/http:tomcat6-csk JAVA_HOME is set to /usr/java Environment variables e.g JAVA_HOME, JAVA_OPTS for tomcat6-csk service can be s et using following commands : # svccfg -s svc:/network/http:tomcat6-csk setenv -m start JAVA_OPTS <java_optio ns> # svccfg -s svc:/network/http:tomcat6-csk setenv -m stop JAVA_OPTS <java_option s> svcadm enable tomcat6-csk svcadm enable apache22-csk Here are the steps: 1. Install the Solaris 10 OS, Solaris Express/Nevada, or OpenSolaris. 2. Make sure your system is networked so that it can reach the Internet and is using a static IP address. If you need assistance with network configuration, review this documentation: System Administration Guide: IP Services. 3. We wish to install MySQL 5 from Blastwave.org. Open a web browser, go to Blastwave.org's step-by-step guide, and perform steps 1 through 7. It's that simple, and you are now ready to use the 4. We are now ready to install MySQL 5 packages. From a console or xterm window, log in as # /opt/csw/bin/pkg-get -i mysql5 mysql5client mysql5devel mysql5rt # /opt/csw/bin/pkg-get -i mysql5test Note: It is very important to install the 5. Now let's set up MySQL 5. Blastwave.org has a guide: Go to http://www.blastwave.org/packages.php/mysql5 and click the grey button that says "View news and info about the software package". We have repeated the guidelines here, and also expanded upon some of the discussion. (Thanks to Blastwave for their generosity in sharing their work with us.) A. Create the config file B. It is important to set up a MySQL user and group before initializing the database in the next step. This is done for you by the Blastwave package install script. However, if you are building MySQL from source, you will need to create a MySQL user and group as follows: # groupadd mysql # useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false mysql C. Initialize the MySQL database and fix the permissions: cd /opt/csw/mysql5 ./bin/mysql_install_db chown -R mysql:mysql ./var Caution: If you skip the D. Start MySQL 5. To simply attempt to start the server and see if the above steps were done correctly, you can issue this command: # cd /opt/csw/mysql5 ; /opt/csw/mysql5/bin/mysqld_safe & You can then check with the This command should work: # pkill mysql Now, to ensure it will start after a reboot, read on. Note: Recent builds of Solaris Express, Nevada, and Solaris 10 updates are using SMF to start daemons such as Old RC File Method: # /etc/init.d/cswmysql5 start New If you installed the MySQL 5 package on a version of Solaris that is using SMF instead of RC files, you will find that the package installed an SMF manifest for MySQL 5, and you can see the state of the service by using this command: # svcs -a | grep mysql disabled 13:36:01 svc:/network/cswmysql5:defaultTo make sure the MySQL 5 server starts (and also at reboot), issue this command: # svcadm enable svc:/network/cswmysql5:default You can verify using this command again: # svcs -a | grep mysql online 15:12:43 svc:/network/cswmysql5:default You can stop the server with command E. Please remember to set a password for the MySQL This should not be the same as your Solaris root user password! To do so, start the server, then issue the following commands: To set the local password: # /opt/csw/mysql5/bin/mysqladmin -u root password 'new-password' # /opt/csw/mysql5/bin/mysqladmin -u root -h <YOUR-HostName-Here> \ password 'new-password' (The previous command line will fail, and is not needed, if you have disabled network access via the security discussion in Step 5, part I below.) See the MySQL 5 documentation for more instructions. F. Optional: This takes some time. You can run test suites for the MySQL daemon with the following commands: # cd /opt/csw/mysql5/mysql-test # ./mysql-test-run G. Check the install: # ./bin/mysql -p You will be prompted to enter MySQL show databases; The quit Note: Startup options may be overridden by creating and editing either The template for
H. Reference docs: I. MySQL security is beyond the scope of this article. However, here are some basic steps to consider:
The preceding steps only scratch the surface, but make for good improvement after installation. Please do review articles about MySQL security on the web by entering "Securing MySQL" into your favorite Internet search engine. 6. We are now done with installing and testing MySQL 5. Next, let's build PHP 5. We'll borrow portions from Mel Lester's web site, with his kind permission. We will modify some of the PHP configuration since we are using different options and paths. Specifically, we will change the configuration of PHP 5 before compiling to use the path to our Blastwave MySQL 5 in A. Log into the global zone as global# echo $PATH /opt/csw/bin:/usr/sfw/bin:/usr/sbin:/usr/bin:/usr/openwin/bin: \ /usr/dt/bin:/usr/ccs/binOK, let's talk. First, you may not want to modify the .profile for root and clutter up the / directory with junk. I'd suggest, for the Solaris 10 OS, Solaris Express, or OpenSolaris, that you create the directory /root, and make another root account in /etc/password that uses the bash orksh shell, and points to /root as a home directory. However, that is a choice and topic for you and Google. Whatever you decide, please ensure that your path has the components above. Then proceed. |