博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
centos系统使用技巧
阅读量:5325 次
发布时间:2019-06-14

本文共 3729 字,大约阅读时间需要 12 分钟。

===============================网络配置===============================

1 eth0 接口配置:/etc/sysconfig/network-scipts/ifcfg-eth0
DEVICE=eth0
HWADDR=C8:60:00:69:CE:04
TYPE=Ethernet
UUID=ff105f76-baaa-4a8d-95c2-efe85fd9ab23
#接口随网络启动而自启动
ONBOOT=yes
NM_CONTROLLED=yes
#静态ip
BOOTPROTO=static
IPADDR=192.168.20.51
NETMASK=255.255.255.0
GATEWAY=192.168.20.254
#若无法解析域名,请配置DNS值
DNS1=202.96.128.86
DNS2=202.96.128.166
#PEERDNS=yes
2 DNS服务器配置: /etc/resolv.conf
nameserver 202.96.128.86
nameserver 202.96.128.166

 

================================vbox安装====================================

1 vim /etc/yum.repo.d/virtualbox.repo  添加如下行:
[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
2 yum install VirtualBox-5.0
3 yum install -y gcc kernel kernel-devel kernel-headers   // 查找kernel安装位置
4 重启电脑 // 或:KERN_DIR=/usr/src/kernels/2.6.32-573.22.1.el6.x86_64 /etc/init.d/vbox  // KERN_DIR填实际安装的位置

 

==================安装增强工具===================

1 sudo yum install kernel-devel gcc gcc-c++ make
2 sudo yum groupinstall “Deveplement Tools”
3 reboot
4 cd /media/VBOXADDITIONS_4.3.6_91406
5 export MAKE='/usr/bin/gmake -i'
6 ./VBoxLinuxAdditions.run
====================更新yum包源======================
1 wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
2 cd /etc/yum.repos.d/
3 mv CentOS-Base.repo CentOS-Base.repo.bak
4 mv CentOS6-Base-163.repo CentOS-Base.repo
5 yum clean all
6 yum makecache
7 yum update

 // 方式2: rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

 ==============php源码安装============

 #yum install -y gcc gcc-c++  make zlib zlib-devel pcre pcre-devel  libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers

 yum install libxml2-devel.x86_64
 yum install  openssl.x86_64 openssl-devel.x86_64 -y
 yum install libcurl.x86_64 libcurl-devel.x86_64 -y
 yum install libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 -y
 yum install libjpeg.x86_64 libpng freetype libjpeg-devel libpng-devel freetype-devel -y
 yum install libmcrypt libmcrypt-devel -y
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo --enable-opcache --with-iconv=/usr/local
缺libconv库时,可源码安装该库到/usr/local(--with-iconv指定的位置,库地址:http://www.gnu.org/software/libiconv/)
 make && make install     // make 遇到错误可将/usr/local/lib 加入动态加载的配置文件/etc/ld.so.conf.d/xxx.conf
 cp php.ini-production /app/soft/php/lib/php.ini
 参考:http://www.cnblogs.com/z-ping/archive/2012/06/18/2553929.html
 php-fpm配置:http://www.cnblogs.com/argb/p/3604340.html

 ================composer安装====================
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
composer config -g secure-http false

转载于:https://www.cnblogs.com/--xiaoyao--/p/5422139.html

你可能感兴趣的文章
HDU 2063 过山车
查看>>
高精度1--加法
查看>>
String比较
查看>>
Django之Models
查看>>
CSS 透明度级别 及 背景透明
查看>>
Linux 的 date 日期的使用
查看>>
PHP zip压缩文件及解压
查看>>
SOAP web service用AFNetWorking实现请求
查看>>
HTTPS、SPDY和HTTP/2的性能比较
查看>>
Java变量类型,实例变量 与局部变量 静态变量
查看>>
sublime快捷键
查看>>
mysql操作命令梳理(4)-中文乱码问题
查看>>
Python环境搭建(安装、验证与卸载)
查看>>
一个.NET通用JSON解析/构建类的实现(c#)
查看>>
Windows Phone开发(5):室内装修 转:http://blog.csdn.net/tcjiaan/article/details/7269014
查看>>
08.存储Cinder→5.场景学习→08.Backup Volume→1.概述与配置
查看>>
详谈js面向对象 javascript oop,持续更新
查看>>
关于这次软件以及pda终端的培训
查看>>
jQuery上传插件Uploadify 3.2在.NET下的详细例子
查看>>
小程序开发笔记
查看>>