vi /etc/sysconfig/network-scripts/ifcfg-eth0
IPADDR=192.168.1.199 NETMASK=255.255.255.0 GATEWAY=192.168.1.1
vi /etc/sysconfig/network
GATEWAY=192.168.1.1
vi /etc/resolv.conf
nameserver 114.114.114.114
yum install -y wget
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
vi /etc/yum.repo.d/mariadb.repo
#MariaDB 5.5 CentOS repository list - created 2016-09-29 14:31 UTC # [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/5.5/centos6-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 yum install MariaDB-server MariaDB-client -y
配置文件 /etc/my.cnf.d/server.cnf
mysql_install_db --defaults-file=/etc/my.cnf --datadir=/usr/local/mariadb/ --user=mysqlservice mysql startmysqladmin -u root password "123456"
root可从任何IP登录
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypwd' WITH GRANT OPTION;
root可从指定IP登陆IP:’192.168.1.2’
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.1.2' IDENTIFIED BY 'mypwd' WITH GRANT OPTION; FLUSH RIVILEGES
//wget rpm -Uvh http://repo.mysql.com/mysql-community-release-el6.rpm yum install -y mysql-server mysql mysql-devel service mysqld start mysqladmin -u root password "123456"
yum install php55w.x86_64 php55w-cli.x86_64 php55w-common.x86_64 php55w-gd.x86_64 php55w-ldap.x86_64 php55w-mbstring.x86_64 php55w-mcrypt.x86_64 php55w-mysql.x86_64 php55w-pdo.x86_64 php55w-fpm -y#其他拓展 yum install -y php55w-bcmath php55w-pecl-imagick php55w-pecl-imagick-devel php55w-pecl-apcu php55w-pecl-apcu-devel php55w-pecl-memcache php55w-pecl-memcached
vi /etc/httpd/conf/httpd.conf
DocumentRoot "/var/www" <Directory "/var/www"> ServerName *:80
添加虚拟主机
vi /etc/httpd/conf.d/xxx.conf
<VirtualHost *:80> DocumentRoot "/var/www/xxx" ServerName xxx.com <Directory "/var/www/xxx"> Options FollowSymLinks AllowOverride all Order deny,allow allow from all </Directory> </VirtualHost>
添加80端口
chkconfig httpd onchk config mysqld on
vi /etc/sysconfig/iptables 增加80
vi /etc/selinux/config selinux=disabled
或者
set enforce 0
yum install -y subversion
不是必须,可能只需要执行svn update
iptables -I INPUT -p tcp --dport 3690 -j ACCEPT 保存 /etc/rc.d/init.d/iptables save 重启 service iptables restart
vi /etc/login.defsPASS_MIN_LEN 8
本文为看恩吧原创文章,转载无需和我联系,但请注明来自knsay.com