In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Linux-Centos-7 LAMP Architecture Forum webpage
Principle of LAMP Architecture
A user request from the customer is sent to the web through the http protocol, tcp port and three-way handshake. If it is a static resource, it can be returned to the user. If it is a dynamic resource, it can be transferred through fastcgi to mobilize php,php through the driver to access mysql, static resource pictures, videos, and interactive information of dynamic resources, such as user login.
Purpose of the experiment: to set up a web page with another forum on the LAMP architecture. Lamp architecture overview
Need three kinds of components: linux,Apache,Mysql, their source code package privately trust me, I will send you, do not need to go to the official document. one。 Understanding the Origin of Apache
two。 Advantages of compiling and installing httpd server
Three. Httpd.conf profile parameters
Listen: IP address and port number of the listener
ServerName: the domain name of the website server
We need to modify these two later.
IV. Httpd.conf profile parameters (continued)
five。 Let's first share the source package we need on the host.
(if your shared files cannot be accessed by linux, check your local policy, deny access to this computer from the network, delete your users, check your network discovery, no, please see my previous blog)
six。 Set the IP address of the host's vmnet1 Nic.
7. Liunx Centos7 visits and mounts shared files. [root@localhost ~] # smbclient-L / / 192.168.100.3 / / access the IP address of the host Enter SAMBA\ root's password: OS= [Windows 10 Enterprise 17763] Server= [Windows 10 Enterprise 17763] Sharename Type Comment-ADMIN$ Disk remote Management C $Disk Default share D$ Disk default share E$ Disk default share F$ Disk default share G$ Disk default share IPC$ IPC remote IPC LAMP Disk LAMP-C7 Disk share Disk Users Disk Connection to 192.168.100.3 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND) NetBIOS over TCP disabled-- no workgroup available [root@localhost ~] # mount.cifs / / 192.168.100.3/LAMP-C7 / mnt/ Mount to the mnt directory Password for root@//192.168.100.3/LAMP-C7: [root@localhost ~] # cd / mnt [root@localhost mnt] # ls See if there are these source packages [root@localhost mnt] # cd / mnt [root@localhost mnt] # lsapr-1.6.2.tar.gz Discuz_X2.5_SC_UTF8.zip LAMP-php5.6.txt php-5.6.11.tar.bz2apr-util-1.6.0.tar.gz httpd-2.4.29.tar.bz2 mysql-5.6.26 .tar.gz8 under the mount directory. Extract the underlying cross-platform toolkit to tar zxvf apr-1.6.2.tar.gz-C / opttar zxvf apr-util-1.6.0.tar.gz-C / opt 9 under the opt directory. Extract the HTTP toolkit to the opt directory Then put the two extracted files of the cross-platform toolkit into tar jxvf httpd-2.4.29.tar.bz2-C / optmv apr-1.6.2 httpd-2.4.29/srclib/aprmv apr-util-1.6.0 httpd-2.4.29/srclib/apr-util [root@localhost mnt] # cd / opt [root@localhost opt] # lsapr-1.6.2 apr-util-1.6.0 httpd-2.4 under the HTTP toolkit. 29 rh [root@localhost opt] # mv apr-1.6.2 httpd-2.4.29/srclib/apr [root@localhost opt] # mv apr-util-1.6.0 httpd-2.4.29/srclib/apr-util [root@localhost opt] # lshttpd-2.4.29 rh10. Install the environment package [root@localhost opt] # yum-y install\ gcc\ gcc-c++\ / / environment language make\ / compiled into a computer-recognized language pcre-devel\ / / pcre language, just like regular expressions expat-devel\ / / support tag-aware language perl / / perl compiler 11. Manually compile and install [root@localhost opt] # cd httpd-2.4.29/ [root@localhost httpd-2.4.29] #. / configure\ >-- prefix=/usr/local/httpd\ / "\" indicates line feed, specify path >-- enable-so\ / / apache core module open >-- enable-rewrite\ / / enable rewrite function, hotlink protection >-- enable-charset-lite\ / / support character set Simplified Chinese >-- enable-cgi / / Universal Gateway Interface > config.status: creating build/rules.mkconfig.status: creating build/pkg/pkginfoconfig.status: creating build/config_vars.shconfig.status: creating include/ap_config_auto.hconfig.status: executing default commandsconfigure: summary of build options:Server Version: 2.4.29Install prefix: / usr/local/httpdC compiler: gcc-std=gnu99CFLAGS:-g-O2-pthread CPPFLAGS:-DLINUX- D_REENTRANT-D_GNU_SOURCE LDFLAGS: LIBS: C preprocessor: gcc-E12. Convert our configuration file into a language that can be recognized by the machine Then install [root@localhost httpd-2.4.29] # make les-module-avoid-version mod_rewrite.lo make [4]: leave directory "/ opt/httpd-2.4.29/modules/mappers" make [3]: leave directory "/ opt/httpd-2.4.29/modules/mappers" make [2]: leave directory "/ opt/httpd-2.4.29/modules" make [2]: enter directory "/ opt / httpd-2.4.29/support "make [2]: leave directory" / opt/httpd-2.4.29/support "make [1]: leave directory" / opt/httpd-2.4.29 "[root@localhost httpd-2.4.29] # make installInstalling man pages and online manualmkdir / usr/local/httpd/manmkdir / usr/local/httpd/man/man1mkdir / usr/local/httpd/man/man8mkdir / usr/local/httpd/manualmake [1]: leave Directory "/ opt/httpd-2.4.29" 13. Put the apache startup script in [root@localhost httpd-2.4.29] # cp / usr/local/httpd/bin/apachectl / etc/init.d/httpd / / put the startup script in for easy management and rename httpd14. Go to vi / etc/init.d/httpd to configure the parameters configuration file by adding parameter # / bin/sh#hkconfig: 35 85 21 / / 35 level autorun 85th startup 21st shutdown # escription: Apache is a World Wide Web server15. Add httpd to the SERVICE manager [root@localhost init.d] # chkconfig-- add httpd [root@localhost init.d] # 16.vi / usr/local/httpd/conf/httpd.conf / / to the configuration file configuration parameter # ServerName www.yun.com:80#Listen 192.168.136.132:80Listen 8017. Make a soft link ln-s / usr/local/httpd/conf/httpd.conf / etc/ make a soft link, and next time just type vim / etc/httpd.conf directly into ln-s / usr/local/httpd/bin/* / usr/local/bin/ do a soft link, so that your system can recognize 18. Check for configuration file syntax errors [root@localhost init.d] # httpd-tAH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this messageSyntax OK [root@localhost init.d] # apachectl-tAH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this messageSyntax OK19. Enable the service [root@localhost init.d] # systemctl stop firewalld.service / / turn off the firewall [root@localhost init.d] # setenforce 0 / / turn off the enhanced feature [root@localhost init.d] # service httpd start / / enable the http service AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this messagehttpd (pid 70331) already running [root@localhost init.d] # netstat-anpt | grep 80 / / View the listening port tcp 0 192.168.136.132 LISTEN 70331/httpd 22 192.168.136.1 ESTABLISHED 3506/sshd: root@pts tcp6 0 0:: 80:: * LISTEN 70331/httpd [root@localhost init.d] # 20. To test whether you can access the HTTP service
two。 Code install MYSQL database [root@localhost init.d] # yum install ncurses-devel autoconf cmake-y / / installation environment package and Cmake toolkit have loaded plug-ins: fastestmirror, langpacksLoading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.nju.edu.cn * updates: mirrors.nju.edu.cn is resolving dependencies-- > checking transactions-- > package autoconf.noarch.0.2.69-11.el7 III. Extract the software package of the database to opt Compilation environment package [root@localhost mnt] # cd / mnttar xzvf mysql-5.6.26.tar.gz-C / opt [root@localhost mnt] # cd / opt [root@localhost opt] # lshttpd-2.4.29 mysql-5.6.26 rh [root@localhost opt] # cd / opt/mysql-5.6.26/ [root@localhost mysql-5.6.26] # cmake\-DCMAKE_INSTALL_PREFIX=/usr/local/mysql\ / / specify the installation path -DDEFAULT_CHARSET=utf8\ / / specify character set-DDEFAULT_COLLATION=utf8_general_ci\ / specify character set default-DEXTRA_CHARSETS=all\ / specify extended character set-DSYSCONFIDIR=/etc\ / specify configuration file directory-DMYSQL_DATADIR=/home/mysql/\ / / data file in specified database-DMYSQL_UNIX_ADDR=/home/mysql/mysql.sock / / define sock file connect to database file IV. Compilation and installation Allows the computer to recognize that if something goes wrong, be sure to check whether your path is correct for [root@localhost mysql-5.6.26] # make [root@localhost mysql-5.6.26] # make install [100%] Building CXX object libmysqld/examples/CMakeFiles/mysql_embedded.dir/__/__/client/readline.cc.oLinking CXX executable mysql_embedded [100%] Built target mysql_embeddedScanning dependencies of target mysqltest_embedded [100%] Building CXX object libmysqld/examples/CMakeFiles/mysqltest_ Embedded.dir/__/__/client/mysqltest.cc.oLinking CXX executable mysqltest_embedded [100%] Built target mysqltest_embeddedScanning dependencies of target my_safe_process [100%] Building CXX object mysql-test/lib/My/SafeProcess/CMakeFiles/my_safe_process.dir/safe_process.cc.oLinking CXX executable my_safe_process [100%] Built target my_safe_ process V. Configuration database [root@localhost mysql-5.6.26] # cp support-files/my-default.cnf / etc/my.cnf / / put the configuration file in cp: do you want to overwrite "/ etc/my.cnf"? Yes [root@localhost mysql-5.6.26] # [root@localhost mysql-5.6.26] # cp support-files/mysql.server / etc/init.d/mysqld / / put the configuration file into the startup script cp: do you want to overwrite "/ etc/init.d/mysqld"? Yes [root@localhostmysql-5.6.26] # chmod 755 / etc/init.d/mysqld / / add execution permissions [root@localhostmysql-5.6.26] # chkconfig-- add / etc/init.d/mysqld / / add services to Service Manager [root@localhostmysql-5.6.26] # chkconfig mysqld-- level 35 on / / 35 enable [root@localhostmysql5.6.26] # echo "PATH=$PATH:/usr/local/mysql / bin "> > / etc/profile// boot system environment variable [root@localhost mysql-5.6.26] # source / etc/profile// boot system environment variable [root@localhost mysql-5.6.26] # echo $PATH / / View system environment variable Has the command been added to / usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/root/bin:/usr/local/mysql/bin:/usr/local/mysql/bin:/usr/local/mysql/bin [root@localhost mysql-5.6.26] # useradd-s / sbin/nologin mysql/ / Creator user Do not allow it to log in to the local console [root@localhost mysql-5.6.26] # chown-R mysql:mysql / / promote the permissions of all users under the path / usr/local/mysql/ 6. Initialize database [root@localhost mysql-5.6.26] # / usr/local/mysql/scripts/mysql_install_db\ / / initialize database-- user=mysql\ / / database user-- ldata=/var/lib/mysql\ / / data-- basedir=/usr/local/mysql\ / / database directory-- datadir=/home/mysql / / database storage directory 7. Open the database and check the port [root@localhost mysql] # vim / etc/init.d/mysqld 46 basedir=/usr/local/mysql / / indicate the path 46 line 47 datadir=/home/mysql / / indicate the location of the database 47 [root@localhost mysql] # vim / etc/init.d/mysqld [root@localhost mysql] # service mysqld start / / Open the database Starting MySQL.... SUCCESS! [root@localhost mysql] # netstat-anpt | grep 3306 / / View listening port tcp6 0 0:: 3306: * LISTEN 6458/mysqld 8. Set the password for the database administrator
[root@localhost mysql] # mysqladmin-u root-p password "abc123"
Enter password:
Warning: Using a password on the command line interface can be insecure.
nine。 Install PHP environment root@localhost opt] # yum-y install\ gd\ / / Image processing, libpng\ / support PNG image libpng-devel\ pcre\ pcre-devel\ libxml2-devel\ / / support parsing, markup language libjpeg-devel / / supports jpg image format 10. Extract and associate the database with APACHE [root @ localhost mnt] # tar xjvf php-5.6.11.tar.bz2-C / optcd / opt/php-5.6.11/ [root@localhost php-5.6.11] #. / configure\ >-- prefix=/usr/local/php5\ / / specify the installation path >-- with-gd\ / / gd library Image processing >-- with-zlib\ / / function library >-- with-apxs2=/usr/local/httpd/bin/apxs\ / / provide functional modules to apache >-- with-mysql=/usr/local/mysql\ / / associated database >-- with-config-file-path=/usr/local/php5\ / / associated PHP configuration >-- enable-mbstring / / functional module load 11. Compile, install Make a soft link [root@localhost php-5.6.11] # make [root@localhost php-5.6.11] # make installInstalling PEAR environment: / usr/local/php5/lib/php/ [PEAR] Archive_Tar-installed: 1.3.12 [PEAR] Console_Getopt-installed: 1.3.1 [PEAR] Structures_Graph- installed: 1.0.4 [PEAR] XML_Util-installed: 1.2.3 [PEAR] PEAR -installed: 1.9.5Wrote PEAR system config file at: / usr/local/php5/etc/pear.confYou may want to add: / usr/local/php5/lib/php to your php.ini include_path/opt/php-5.6.11/build/shtool install-c ext/phar/phar.phar / usr/local/php5/binln-s-f phar.phar / usr/local/php5/bin/pharInstalling PDO headers: / usr/local/php5/include/php/ext / pdo/ [root@localhost php-5.6.11] # cp php.ini-development / usr/local/php5/php.ini// copy configuration file to php.ini [root@localhost php-5.6.11] # ln-s / usr/local/php5/bin/* / usr/local/bin/ make a soft link to all commands of php5 [root@localhost php-5.6.11] # ln-s / usr/local/php5/sbin/* / Usr/local/sbin/ [root@localhost php-5.6.11] # vim / etc/httpd.conf DirectoryIndex index.html index.php / / default home page with phpAddType application/x-httpd-php .phpAddType application/x-httpd-php-source .phps / / add PHP configuration file 12. Go to the web configuration file, PHP [root@localhost php-5.6.11] # cd / usr/local/httpd/htdocs/root@localhost htdocs] # mv index.html index.phpvi / usr/local/httpd/htdocs/index.php [root@localhost htdocs] # lsindex.php13. Our LAMP architecture will be fine.
14. Configuration database [root@localhost ~] # cd / mnt / / our forum package is in our previous source package Private message I [root@localhost mnt] # lsapr-1.6.2.tar.gz httpd-2.4.29.tar.bz2 php-5.6.11.tar.bz2apr-util-1.6.0.tar.gz LAMP-php5.6.txtDiscuz_X2.5_SC_UTF8.zip mysql-5.6.26.tar.gz [root@localhost mnt] # mysql- u root-p / / enter the database Enter password: / / input Enter your set password abc123Welcome to the MySQL monitor. Commands end with; or\ g.Your MySQL connection id is 1Server version: 5.6.26 Source distributionCopyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or'\ h' for help. Type'\ c'to clear the current input statement.mysql > create database bbs; / / create database Query OK, 1 row affected (0.00 sec) mysql > show databases / / View database +-+ | Database | +-+ | information_schema | | bbs | | mysql | | performance_schema | | test | +-+ 5 rows in set (0.02) Sec) mysql > GRANT all ON bbs.* TO 'bbsuser'@'192.168.102.166' IDENTIFIED BY' admin123' / / upgrade permissions to all forms in the BBS database, to bbsuser users, to all terminals can log in, set the password admin123Query OK, 0 rows affected (0.01 sec) mysql > flush privileges;Query OK, 0 rows affected (0 sec) mysql > exit / / exit Bye15. Unzip the forum package to opt [root@localhost htdocs] # cd / mnt [root@localhost mnt] # lsapr-1.6.2.tar.gz httpd-2.4.29.tar.bz2 php-5.6.11.tar.bz2apr-util-1.6.0.tar.gz LAMP-php5.6.txtDiscuz_X2.5_SC_UTF8.zip mysql-5.6.26.tar.gz [root@localhost mnt] # Discuz_X2.5_SC_ UTF8.zip-d / opt/dis/ / unpack this forum package to OPT creating: / opt/dis/utility/oldprg/uchome/ inflating: / opt/dis/utility/oldprg/uchome/invite.php inflating: / opt/dis/utility/oldprg/uchome/space.php inflating: / opt/dis/utility/restore.php inflating: / opt/dis/utility/update.php [root@localhost mnt] # cd / opt/dis [root@localhost Dis] # cp-r upload/ / usr/local/httpd/htdocs/bbs / all the things on the website Copy it to the apache site and name it bbs [root@localhost bbs] # cd / usr/local/httpd/htdocs/ [root@localhost htdocs] # ls / / to see if there is a page configuration file called bbs index.php16. To visit this bbs page
17. To enhance the rights of program users [root@localhost htdocs] # cd bbs/ [root@localhost bbs] # ls-l total amount of 76 Murray RW Murray. 1 root root 2603 October 20 10:13 admin.phpdrwxr-xr-x. 11 root root 163Oct 20 10:13 api-rw-r--r--. 1 root root 727 October 20 10:13 api.phpdrwxr-xr-x. 2 root root 23 October 20 10:13 archiverdrwxr-xr-x. 2 root root 90 October 20 10:13 config-rw-r--r--. 1 root root 922 October 20 10:13 connect.php-rw-r--r--. 1 root root 253 October 20 10:13 cp.php-rw-r--r--. 1 root root 106 October 20 10:13 crossdomain.xmldrwxr-xr-x. 13 root root 21 16 October 20 10:13 data-rw-r--r--. 1 root root 5558 October 20 10:13 favicon.ico-rw-r--r--. 1 root root 2110 October 20 10:13 forum.php-rw-r--r--. 1 root root 823 October 20 10:13 group.php-rw-r--r--. 1 root root 1223 October 20 10:13 home.php-rw-r--r--. 1 root root 5448 October 20 10:13 index.phpdrwxr-xr-x. 5 root root 64 October 20 10:13 install-rw-r--r--. 1 root root 1040 October 20 10:13 member.php-rw-r--r--. 1 root root 1381 October 20 10:13 misc.php-rw-r--r--. 1 root root 1757 October 20 10:13 plugin.php-rw-r--r--. 1 root root 985 October 20 10:13 portal.php-rw-r--r--. 1 root root 582 October 20 10:13 robots.txt-rw-r--r--. 1 root root 1158 October 20 10:13 search.phpdrwxr-xr-x. 10 root root 168 October 20 10:13 sourcedrwxr-xr-x. 6 root root 72 October 20 10:13 staticdrwxr-xr-x. 3 root root 38 October 20 10:13 templatedrwxr-xr-x. 6 root root 92 October 20 10:13 uc_clientdrwxr-xr-x. 13 root root 241 October 20 10:13 uc_server-rw-r--r--. 1 root root 1691 October 20 10:13 userapp.php [root@localhost bbs] # chown-R daemon. / config [root@localhost bbs] # chown-R daemon. / data [root@localhost bbs] # chown-R daemon. / uc_ client [root @ localhost bbs] # chown-R daemon. / uc_server/ data [root @ localhost bbs] # [root@localhost bbs] # ls-l the total amount is 76Murrwtel. 1 root root 2603 October 20 10:13 admin.phpdrwxr-xr-x. 11 root root 163Oct 20 10:13 api-rw-r--r--. 1 root root 727 October 20 10:13 api.phpdrwxr-xr-x. 2 root root 23 October 20 10:13 archiverdrwxr-xr-x. 2 daemon root 90 October 20 10:13 config-rw-r--r--. 1 root root 922 October 20 10:13 connect.php-rw-r--r--. 1 root root 253 October 20 10:13 cp.php-rw-r--r--. 1 root root 106 October 20 10:13 crossdomain.xmldrwxr-xr-x. 13 daemon root 21 16 October 20 10:13 data-rw-r--r--. 1 root root 5558 October 20 10:13 favicon.ico-rw-r--r--. 1 root root 2110 October 20 10:13 forum.php-rw-r--r--. 1 root root 823 October 20 10:13 group.php-rw-r--r--. 1 root root 1223 October 20 10:13 home.php-rw-r--r--. 1 root root 5448 October 20 10:13 index.phpdrwxr-xr-x. 5 root root 64 October 20 10:13 install-rw-r--r--. 1 root root 1040 October 20 10:13 member.php-rw-r--r--. 1 root root 1381 October 20 10:13 misc.php-rw-r--r--. 1 root root 1757 October 20 10:13 plugin.php-rw-r--r--. 1 root root 985 October 20 10:13 portal.php-rw-r--r--. 1 root root 582 October 20 10:13 robots.txt-rw-r--r--. 1 root root 1158 October 20 10:13 search.phpdrwxr-xr-x. 10 root root 168 October 20 10:13 sourcedrwxr-xr-x. 6 root root 72 October 20 10:13 staticdrwxr-xr-x. 3 root root 38 October 20 10:13 templatedrwxr-xr-x. 6 daemon root 92 October 20 10:13 uc_clientdrwxr-xr-x. 13 root root 241 October 20 10:13 uc_server-rw-r--r--. 1 root root 1691 October 20 10:13 userapp.php
18. Straight to the next step
19. Fill in your address, database name, database user name, database password, administrator password and set a 123 by yourself. the rest are default.
20. Enter http://192.168.136.132/bbs to go directly to the home page of the forum.
21. Http://192.168.136.132/bbs/admin.php enters the backend. You can enter your password and user name.
23. In your backend, you can modify it as you like.
24.LAMP script-install Apache---- the following two plug-ins are required for future versions of httpd2.4-tar zxvf apr-1.6.2.tar.gz-C / opttar zxvf apr-util-1.6.0.tar.gz-C / opttar jxvf httpd-2.4.29.tar.bz2-C / optmv apr-1.6.2 httpd-2.4.29/srclib/aprmv apr-util- 1.6.0 httpd-2.4.29/srclib/apr-utilyum-y install\ gcc\ gcc-c++\ make\ pcre-devel\ expat-devel\ perlcd httpd-2.4.29./configure\-prefix=/usr/local/httpd\-enable-so\-enable-rewrite\-enable-charset-lite\-enable-cgimake & & make installcp / usr/local/httpd/bin/apachectl / etc/init.d/httpdvi / etc/init.d/httpd#chkconfig: 35 85 21 / / 35 level automatic operation 85th startup 21st shutdown # description: Apache is a World Wide Web serverchkconfig-- add httpd/ / add httpd to SERVICE manager vi / usr/local/httpd/conf/httpd.conf / / to the configuration file configuration parameter ServerName www.yun.com:80 / / domain name change at will Listen 192.168.136.132 add httpd/ 80 / / listen address write your local address ln- S / usr/local/httpd/conf/httpd.conf / etc/ make a soft link Next time, just type vim / etc/httpd.conf directly to ln-s / usr/local/httpd/bin/* / usr/local/bin/ to make a soft link. It is convenient for your system to recognize systemctl stop firewalld.servicesetenforce 0httpd-t apachectl-tservice httpd startnetstat-anpt | grep 80-the following is the installation of MYSQL- http://mirrors.sohu.com/mysql/---yum install ncurses-devel autoconf cmake-y / / installation environment package and Cmake toolkit cd / mnttar xzvf mysql-5.6.26.tar.gz-C / optcd / opt/mysql-5.6.26/ Cmake\-DCMAKE_INSTALL_PREFIX=/usr/local/mysql\ / specify installation path-DDEFAULT_CHARSET=utf8\ / / specify character set-DDEFAULT_COLLATION=utf8_general_ci\ / specify character set default-DEXTRA_CHARSETS=all\ / / specify extended character set-DSYSCONFIDIR=/etc\ / specify configuration file directory-DMYSQL_DATADIR=/home/mysql/\ / / specify data files in the database-DMYSQL_UNIX_ADDR=/ Home/mysql/mysql.sock / / define sock file connection database file make & & make install / / A language recognized by the compiling computer Install cp support-files/my-default.cnf / etc/my.cnf / / put the configuration file in cp support-files/mysql.server / etc/init.d/mysqld / / put the configuration file in the startup script chmod 755 / etc/init.d/mysqld / / add execution permissions chkconfig-- add / etc/init.d/mysqld / / add services to the service manager chkconfig mysqld-- level 35 on / / 35 Enable echo "PATH=$PATH:/usr/local/mysql/bin" > > / etc/profile / / declare that call the mysql command to generate to the system environment variable source / etc/profile / / start the system environment variable echo $PATH / / View the system environment variable Has the command been added to the useradd-s / sbin/nologin mysql / / create program user Do not allow it to log in to the local console chown-R mysql:mysql / usr/local/mysql/ permissions of all users under the promotion path / usr/local/mysql/scripts/mysql_install_db\ / / initialize the database-- user=mysql\ / / database users-- ldata=/var/lib/mysql\ / / data-- basedir=/usr/local/mysql\ / / database directory-- datadir=/home/mysql / / According to the inventory directory, vi / etc/init.d/mysqld / / Edit the database file basedir=/usr/local/mysql / / indicate the path datadir=/home/mysql / / indicate the location of the database service mysqld start / / Open the database netstat-anpt | grep 3306 / / View the listening port mysqladmin-u root-p password "abc123" / / set the password for the root account-install below PHP-yum-y install\ gd\ / / Image processing Libpng\ / / support PNG image libpng-devel\ pcre\ pcre-devel\ libxml2-devel\ / / support parsing, markup language libjpeg-devel / / support jpg picture format cd / mnttar xjvf php-5.6.11.tar.bz2-C / opt / / php is just a code in the background In the backend cd / opt/php-5.6.11/./configure\-- prefix=/usr/local/php5\ / / specify the installation path-- with-gd\ / / gd library Image processing-- with-zlib\ / / function library-- with-apxs2=/usr/local/httpd/bin/apxs\ / / provide functional modules to apache-- with-mysql=/usr/local/mysql\ / / associated database-- with-config-file-path=/usr/local/php5\ / / associated PHP configuration-- enable-mbstring / / functional modules load make & & make installcp php.ini-development / usr/local/php5 / php.iniln-s / usr/local/php5/bin/* / usr/local/bin/ln-s / usr/local/php5/sbin/* / usr/local/sbin/vi / etc/httpd.conf / / can load the functional module of PHP in the apache configuration file AddType application/x-httpd-php .php / / join the configuration file of PHP AddType application/x-httpd-php-source .phpsDirectoryIndex index.php index.html / / add phpvi / by default home page Usr/local/httpd/htdocs/index.php tests "http://192.168.80.182/index.php"mysql-u root-pCREATE DATABASE bbs" on the web page. / / create a database GRANT all ON bbs.* TO 'bbsuser'@'192.168.102.166' IDENTIFIED BY' admin123'; / / upgrade permissions to all forms in the BBS database, to bbsuser users, to all terminals can log in, set the password admin123flush privileges Unzip / mnt/Discuz_X2.5_SC_UTF8.zip-d / opt/discd / opt/discp-r upload/ / usr/local/httpd/htdocs/bbs / / everything on the website Copy to the apache site and give the name bbschown-R daemon. / config / / to the user of the daemon program chown-R daemon. / datachown-R daemon. / uc_clientchown-R daemon. / uc_server/data- to test whether the database is working properly-mysql-u root-pCREATE DATABASE sky GRANT all ON sky.* TO 'skyuser'@'%' IDENTIFIED BY' admin123';flush privileges; is all we have. If you want the source code package, you must trust me privately.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.