Centos backend system setup record

Author: Mo Zhuoying

Background:

Recently, due to the need to build a background test system, it is necessary to build mysql, apache, fastcgi, and svn under the centos system. Since the online tutorials are scattered and many are out of date, they are reorganized as follows:

mysql

1. installation####

 yum install mysql mysql-server mysql-devel

2. Database configuration file####

/etc/my.cnf

3. Start mysql

 service mysqld start

4. Boot from start

 chkconfig --add mysqld

5. Setting login password####

 mysqladmin -u user name password password

6. Login to mysql

 mysql -u user name-p password

7. forget password####

 service mysqld stop
 mysqld_safe --user=root --skip-grant-tables
 mysql -u root
 use mysql
 update user set password=password("new_pass") where user="root";
 flush privileges;

Install php5.6

1. Configure yum source####

 rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/7/x86_64/e/epel-release-7-5.noarch.rpm 
 rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

2. Confirm the installed php version####

 yum list --enablerepo=remi --enablerepo=remi-php56 | grep php

3. Install php5.6

 yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common

4. Confirm php version####

 php -v

5. Start fpm:

/etc/init.d/php-fpm start

6. Boot from start

 chkconfig --add php-fpm
 chkconfig  php-fpm on

Install svn library###

1. installation####

 yum install subversion -y

2. Create library address####

 mkdir -p /home/svnrepo/
 svnadmin create /home/svnrepo/

3. Setting permissions####

Enter the folder conf generated above to configure, there are the following files authz, passwd, svnserve.conf, set passwd

4. Set permissions authz

Set the permissions of the above user to the file

5. Set access permissions####

 anon-access = none #Make it inaccessible to unauthorized users
auth-access = write #Give authorized users write permissions
password-db = password
authz-db = authz   #Access control file
realm =/opt/svn/repos #Authentication namespace, subversion will be displayed in the authentication prompt and used as a key for credential cache.

6. Start svn

 svnserve -d -r set directory

7. View port

 netstat -antp | grep svn

Install apache

1. installation####

 yum  install  httpd -y

2. Start apache

 service httpd start

3. Boot from start

 chkconfig --add httpd
 chkconfig  httpd  on

4、 apache start fastcgi

 yum install libtool httpd-devel apr-devel apr
 wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz
 tar -zxvf mod_fastcgi-current.tar.gz
 cd mod_fastcgi-2.4.6/
 cp Makefile.AP2 Makefile

 make top_dir=httpd installation directory
 make install top_dir=httpd installation directory

Original link: http://ivweb.io/topic/56096bfbc2317a8c3e0861fd

Recommended Posts

Centos backend system setup record
Centos7.6 operating system installation and optimization record
01 CentOS 7.6 switch system language
CentOS7.5-1804 system kernel upgrade
CentOS system startup process
VirtualBox install CentOS system
CentOS8.x system configuration record
CentOS7.x system configuration record
Centos7.2 system optimization original
Centos system process management
Centos 7 mini installation process record
Centos various time [system time/hardware time]
CentOS system optimization script, unfinished
CentOS 6.x installation mysql5.7 record
Centos7 system commonly used commands
Install docker on Centos system
Centos system modify time zone
centos6.5: gcc upgrade (5.2.0) process record
Centos6 system boot loading process
Linux centos system boot process
CentOS 6.X system initialization script
RabbitMQ cluster deployment record under Centos6.9
Elasticsearch cluster deployment record under CentOS7
CentOS 7.X system installation and optimization
CentOS7.2 install lepus database monitoring system
Install Centos7 operating system in Docker
001. Installation of enterprise-level CentOS7.6 operating system
FFmpeg environment deployment record under centos7
PPTP environment deployment record under Centos