標籤:
在CentOS7 ip命令代替ifconfig命令
Linux配置網路,mac一定要和本機是對的,一定不能少
yum install nginx php55u php55u-fpm mysql56u mysql56u-server
這是mysql community社區版的repo源
sudo yum -y install http://repo.mysql.com/mysql-community-release-el7.rpm
都安裝完畢後,複製我Linux目錄下的CentOS7_Repo裡的repo到centos裡去
----------------------------------------------------------------------------
sudo yum install -y http://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.6.2-1.el7.ngx.x86_64.rpm
sudo yum install -y php55.x86_64 php55-php-common.x86_64 php55-php-devel.x86_64 php55-php-fpm.x86_64 php55-php-gd.x86_64 php55-php-imap.x86_64 php55-php-mbstring.x86_64 php55-php-mysqlnd.x86_64 php55-php-pdo.x86_64 php55-php-pear.noarch php55-php-pecl-jsonc.x86_64 php55-php-odbc.x86_64 php55-php-pecl-memcached.x86_64 php55-php-pecl-mongo.x86_64 php55-php-pecl-oauth.x86_64 php55-php-pecl-xdebug.x86_64 php55-php-soap.x86_64 php55-php-xml.x86_64 php55-php-pecl-redis.x86_64 php55-php.x86_64
sudo yum install -y mysql-community-server.x86_64 mysql.x86_64
sudo yum install -y php-pecl-xdebug.x86_64 php54w* --exclude=php54w-mysql
- 配置centos
yum install vim net-tools
sudo systemctl enable sshd
sudo systemctl disable firewalld.service
sudo vim /etc/selinux/config
sudo systemctl enable nginx
sudo systemctl enable php-fpm
sudo yum install -y lsof
ntpdate asia.pool.ntp.org
sudo yum -y install ntpdate
sudo yum install -y yum-utils.noarch wget vsftpd openssl gcc openssl-devel
sudo yum reinstall php54w --downloadonly --downloaddir=./
sudo systemctl enable vsftpd
sudo systemctl enable mysqld
sudo cat set alias ls="ls --color=always"=>/root/.bashrc
sudo yum install unzip
sudo yum install git –y
//可以查看網域名稱解析
sudo yum install dig –y
//可以查看系統的詳細資料
sudo yum install redhat-lsb.x86_64 -y
_____________________________________________________________________________________________________________________________________________________________________________________________
多版本php共存(樣本: php-5.3.29):
可以去部落格看: http://blog.saymoon.com/2012/09/linuxnginx_multi_version_php/
sudo yum install –y libxml2-devel.x86_64
sudo yum install mysql-community-embedded-devel.x86_64 –y
因為如果我們之前安裝過lnmp肯定會有autoconf,只是可能版本不同,所以我們需要安裝autoconf-2.13的版本,然後放置到環境變數.
export設定只對當前的bash登入session有效。這是存在記憶體裡面的。
你可以寫入檔案一般的檔案。之後source它。或者放到/etc/profile 等等的位置裡,不同的地方效果不同。
export PHP_AUTOCONF=/usr/share/autoconf-2.13/autoconf¬
export
PHP_AUTOHEADER=
/usr/share/autoconf-2.13/autoheaders
解決configure: error: Cannot find libmysqlclient under /usr.
今天在64位centos5.6系統上編譯PHP5.2.17報錯
checking for MySQLsupport... yes, shared checking for specified location of the MySQL UNIXsocket... no checking for the location of libz... no checking for MySQL UNIXsocket location... /var/lib/mysql/mysql.sock configure: error: Cannot findlibmysqlclient under /usr. Note that the MySQL client library is not bundledanymore! [[email protected] mysql]#
經查,問題是64位系統中 libmysqlclient 預設安裝到了/usr/lib64/mysql/ 目錄下
而/usr/lib 目錄下沒有相應檔案,但是php編譯時間,要去 /usr/lib目錄下尋找
解決方案:
ln -s /usr/lib64/mysql/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so
然後直接就這樣啦:
./configure --prefix=/opt/php-5.3.29 --with-config-file-path=/opt/php-5.3.29/etc --with-mysql=/usr/lib64/mysql --with-mysqli=/usr/bin/mysql_config --enable-fpm --with-apxs2=/opt/apache/dependent/bin/apxs
make install
____________________________________________________________________________________________________________________________________________________________________________________________
配置apache的:
./configure --prefix=/opt/apache --exec-prefix=/opt/apache/dependent --enable-example
____________________________________________________________________________________________________________________________________________________________________________________________
在linux下經常sudo ls -al不著色,那是因為sudo沒去自動使用目前使用者的bashrc配置
我們需要
sudo cat alias ls=‘ls --color=always‘=>~/.bashrc
sudo cat alias sudo=‘sudo ‘=>~/.bashrc
source ./.bashrc
擴充文:
http://blog.chinaunix.net/uid-10347480-id-3267667.html
http://www.shellperson.net/using-sudo-with-an-alias/
source命令用法:
source FileName
作用:在當前bash環境下讀取並執行FileName中的命令。
註:該命令通常用命令“.”來替代。
如:source .bash_rc 與 . .bash_rc 是等效的。
如果需要安裝openssl=>http://www.cnblogs.com/xiangxiaodong/archive/2013/07/30/3225718.html 把上面整完再裝最好,因為一些依賴的包,可能上面都裝好了
架構CentOS總結--老早自己做的一些記錄,隨便看看吧