I spent my whole week trying how to use file-sharing application such as Oliver webshare, PHP file mahager and bfExplorer. Those application are based on PHP (and MySql on bfExplorer) My box has apache2 in it. At the first time i thought Apache2 is enough to run those applications. But then I realized, THOSE APPLICATIONS ARE BASED ON PHP :D
Not just Apache, but also I need to install PHP on it (MySQL is just a bonus :D) Lots of tutorial on how-to configure PHP on Solaris, but these time I'm gonna use a package called coolstack http://cooltools.sunsource.net/coolstack/index.html or you can get it here
First, login into your Solaris box as root
1. Connecting to 192.168.1.150:23...
Connection established.
Escape character is '^@]'.
login: root
Password:
Last login: Wed Nov 4 12:35:45 from 192.168.1.192
Sun Microsystems Inc. SunOS 5.10 Generic January 2005
You have mail.
Sourcing //.profile-EIS.....
root@u10 #
2. Install the Coolstack package. CSKruntime first.
root@u10 # bunzip CSKruntime_1.3.1_i386.pkg.bz2
root@u10 # pkgadd -d CSKruntime_1.3.1_i386.pkg
3. Install the CSKamp package.
root@u10 # bunzip CSKamp_1.3.1_i386.pkg.bz2
root@u10 # pkgadd -d CSKamp_1.3.1_i386.pkg
4. Once the installation is completed, we can start to configure.
Let's begin with the APACHE
> The root document is located at /opt/coolstack/apache2/htdocs
> The configuration file, binary, lib and so on are located at /opt/coolstack/apache2
> At first, there is no file such httpd.conf, what exists is httpd.conf-example
> Rename the file to http.conf
> You can customize the configuration file at /etc/coolstack/apache2/conf/httpd.conf
> Start it
root@u10 # svcadm enable apache22
> Check the service
root@u10 # svcs | grep apache22
online 10:34:47 svc:/network/http:apache22-csk
> Open your browser, go to http://your-solaris-box
Now, configuring MySql
> Export the PATH
root@u10 # export PATH=/opt/coolstack/mysql_32bit/bin:$PATH
> Install the database and create the user and the group
root@u10 # /opt/coolstack/mysql_32bit/bin/mysql_install_db
root@u10 # groupadd mysql
root@u10 # useradd -c “MySQL Server” -g mysql mysql
> Change the owner of the directory
root@u10 # chown -R mysql:mysql /opt/coolstack/mysql_32bit
root@u10 # cp /opt/coolstack/mysql_32bit/share/mysql/my-large.cnf /etc/my.cnf
> Run it
root@u10 # /opt/coolstack/mysql_32bit/bin/mysqld_safe &
> Check the service
root@u10 # ps -ef | grep mysql
root 8530 15420 0 13:23:53 pts/2 0:00 grep mysql
mysql 7341 7270 1 13:23:10 pts/3 0:01 /opt/coolstack/mysql_32bit/bin/mysqld --basedir=/opt/coolstack/mysql_32bit --da
root 7270 23464 0 13:23:09 pts/3 0:00 /bin/sh /opt/coolstack/mysql_32bit/bin/mysqld_safe
> Set the root password for MySql
root@u10 # /opt/coolstack/mysql_32bit
/bin/mysqladmin -u root password ‘yourpassword’
> Try to login into the MySql
root@u10 # /opt/coolstack/mysql_32bit/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.25-rc-standard-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
> Try to create a database
mysql> create database mydata;
Query OK, 1 row affected (0.12 sec)
mysql> quit
Bye
Finally, the PHP5
> PHP5 automatically installed by the CSKampx.x.x
> the directory is located at /opt/coolstack/php5
No comments:
Post a Comment