A few days ago, in order to build this blog platform, I built a test environment myself. It was not bad. I immediately applied for the space domain name online. Now the installation process is summarized. The whole process is very detailed: OS is redhat linux Platform, the prepared installation package is as follows: httpd-2.2.19.tar #apache service source code MySQL-client-5.5.12-1.rhel5.i386.rpm #mysql database server package MySQL-client-5.5.12-1. Rhel5.i386.rpm #mysqldatabase client package MySQL-devel-5.5.12-1.rhel5.i386.rpm #mysql.h library installation package php-5.3.6.tar.gz #phpenvironment source codewordpress-3.1. 2-zh_CN.tar.gz #wordpress compressed package program phpMyAdmin-3.2.1-all-languages.tar.gz #phpmysql management source code one, install mysql: 1, create mysql user group and user #groupadd mysql #Create mysql Group #useradd -g mysql mysql #Create user mysql and add it to the mysql group. This user is mainly a user running as mysql service. 2. Install mysql#rpm -ivh MySQL-client-5.5.12-1.rhel5.i386. Rpm#rpm -ivh MySQL-client-5.5.12-1.rhel5.i386.rpm#rpm -ivh MySQL-devel-5.5.12-1.rhel5.i386.rpm install using RPM package The installation path should be in the /usr/share/mysql directory. MySQL dump file location: /usr/bin/mysqldumpMySQL configuration file: /etc/my.cnf or /usr/share/mysql/my.cnfMySQL Data directory: /var/Lib/mysql3, change the root password of mysql #/usr/bin/mysqladmin -u root password ’123abc’ #Set the user root password for entering the mysql database 4, test whether mysql is available #/usr/local/mysql/bin/mysql -u root -p #Use user root to connect mysql#Enter password:123abc #Enter the password displayed in the previous step 123abc”mysql use”status” or”select version();” command to view the current mysql version ( Make sure your version is correct. 5. Move mysql data file storage directory MySQL default data file storage directory is /var/lib/mysql. If you want to move the directory to /opt/msdata, you need to perform the following steps:
1) Create a data directory in the /opt directory #mkdir /opt/msdata2) Stop the MySQL service process: #mysqladmin -u Root -p shutdown3) Move the entire directory /var/lib/mysql to /opt/msdata#mv /var/lib/mysql /opt/msdata/and move the MySQL data file to /opt/msdata/mysql 4 Find the my.cnf configuration file. If there is no my.cnf configuration file in the /etc/directory, please find the *.cnf file under /usr/share/mysql/, copy one of them to /etc/and rename it to my.cnf) in. The command is as follows: #cp /usr/share/mysql/my-medium.cnf /etc/my.cnf5) Edit the MySQL configuration file /etc/my.cnf to ensure that MySQL works properly, you need to specify the mysql.sock file generation. position. Modify the socket=/var/lib/mysql/mysql.sock line to the right of the medium value: /opt/msdata/mysql/mysql.sock. The operation is as follows: #vi my.cnf (Edit my.cnf file with vi tool, find the following data to modify it) # The MySQL server[mysqld]port = 3306#socket = /var/lib/mysql/mysql.sock (for more Secure, use “#” comment this line) socket = /opt/msdata/mysql/mysql.sock (plus this line) 6, modify the MySQL startup script /etc/rc.d/init.d/mysql Finally, Need to modify the MySQL startup script /etc/rc.d/init.d/mysql, in the datadir=/var/lib/mysql line, change the path to the right of the equal sign to your current actual storage path: /opt/msdata/Mysql. #vi /etc/rc.d/init.d/mysql#datadir=/var/lib/mysql (comment this line) datadir=/opt/msdata/mysql (plus this line) 7, set mysql boot from boot /etc/rc.d/rc.local add /usr/bin/mysqld_safe -user=mysql & Second, install Apache#tar -zxvf httpd-2.2.19.tar #解压缩#cd httpd-2.2.19#. /configure -prefix=/usr/local/apache –with-mysql=/usr/share/mysql -enable-module=so -enable-shared=max -enable-rewrit#“-prefix”Set the program installation directory The absolute path. If not set, install it to the default path “/usr/local/bin”. The “-ebable- module=so” option sets the Apache server to use the dynamic load module feature. –enable-shared=max max means that all configured modules are compiled into DSO modules (except for so, so can't be compiled into DSO). Using dynamic loading will result in a 5% performance degradation, but it is nothing compared to the benefits: for example, the module is easy to upgrade, the system upgrade risk is reduced, and the installation process is standardized. The “–enable-rewrite” option sets the Apache server to have rewrite functionality. The rewrite function enables rewriting of dynamic web page addresses, allowing web page visitors to access pages in a dynamic web page with a simpler and easier to remember web page address. #make #编译来源#make install #install /usr/local/apache/bin/apachectl start #Start the httpd service, mainly do not start /etc/rc.d/init.d/httpd, this is the default installation. After the installation is complete, enter http://192.168.1.110 in IE browser to see if you can access the default page. If it succeeds, it will display “It’s Works!” 3. Install PHP
Environment#tar - Zxvf php-5.3.6.tar.gz#cd php-5.3.6#./configure -prefix=/usr/local/php –with-mysqli=/usr/bin/mysql_config –with-mysql=/usr /include/mysql -with-apxs2=/usr/local/apache/bin/apxs -with-config-file-path=/usr/local/php#make#make install#cp php.ini-production /usr/local /php/lib/php.ini #Copy the configuration file template to the default configuration file #vi /usr/local/php/bin/php.ini and change it to register_globals=On 4. Configure httpd.confvi /usr/local/Apache/conf/httpd.conf1, check if there is LoadModule php5_module libexec/libphp5.so2, then add AddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps3, find ”DirectoryIndex index .html” Add index.php4 before index.html, close and restart httpd service#/usr/local/apache/bin/apachectl restart
Nginx starts with version 0.7.48 and supports Squid-like caching. This cache uses the URL and relate
Layer 2 Tunneling Protocol (L2TP) is an industry standard Internet tunneling protocol that uses UDP
LDM/STM instructions are mainly used for field protection, data copying, parameter transfer, etc. ST
This period win8.1 Mac OS X 10.9 Mavericks Two operating systems almost simultaneously released, i
Naming files with variables in Linux
Liunx scheduled backup mysql task implementation code
Modify IP, DNS, and routing configuration under Linux
Svn use under linux (svn command)
How to configure chroot SFTP in Linux
Time synchronization under Linux
Linux environment variable settings summary
Software-only dual-system hot standby solution in-depth analysis
30 questions that must be mastered by embedded system Linux kernel development engineers
Teach you to enable the fingerprint recognition function built in Windows 7
Retaining useful emails Correcting Foxmail filtering errors
Prompt "win7 load driver" how to solve?
Windows8.1 Super Slimming Raiders
PPStream has four solutions for images without sound
Counting Win8's unique skills IE10 to advertise without plugins
Win7 system play CF cross fire line, there is no reaction, what should I do?