新服务器完整搭建www环境过程_MySQL
很久不搭www环境了,几乎都要忘了,而且各种新版本,各种新参数。前段时间用金山云的主机,速度蛮不错的,可惜备案过程是相当纠结,导致了本博被墙了一个多礼拜,狠狠心重新在西部数码买了一台,所以又要重新搭环境。之前搭环境有记录编辑参数,没记录具体步骤,这次干脆把从前到后所有步骤记录下来,以后操作也方便。懒人改变世界!
搜索rpmforge包
下载对应系统版本的rpmforge#rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
#rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm
#rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm
检查系统环境,更新软件库,安装依赖#chkconfig --list
#chkconfig --del mysql
#chkconfig --del httpd
#rpm -qa | grep http
#rpm -e httpd
#rpm -qa | grep apache
#rpm -e apache
#rpm -qa | grep php
#rpm -e php
#rpm -qa | grep mysql
#rpm -e mysql
#yum -y remove httpd*
#yum -y remove mysql*
#yum -y remove php*
#yum update
#yum install patch make gcc gcc-c++ automake cmake autoconf kernel-devel libtool libtool-libs libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glib2 glib2-devel bzip2 bzip2-devel libevent libevent-devel glibc glibc-devel glibc-headers glibc-static glibc-utils openssl openssl-devel crypto-utils gettext gettext-devel ncurses ncurses-devel gmp-devel aspell aspell-devel perl-IO-Compress-Base perl-HTML-Parser perl-ExtUtils-MakeMaker perl-libwww-perl perl-Pod-Escapes perl-Module-Pluggable perl-libs perl-ExtUtils-FindFunctions perl-Compress-Raw-Zlib perl-IO-Compress-Zlib perl-Test-Harness perl-ExtUtils-ParseXS perl-Newt perl-HTML-Tagset perl-URI perl-Convert-ASN1 perl-ExtUtils-Embed perl-Pod-Simple perl-ExtUtils-DynaGlue perl-Compress-Zlib perl-devel perl-DBI gd gd-devel curl libcurl libcurl-devel readline readline-devel
添加对应用户#groupadd mysql
#useradd -g mysql -s /sbin/nologin mysql
#groupadd www
#useradd -g www -s /home/www www
安装mysql
#cmake /-DCMAKE_INSTALL_PREFIX=/usr/local/mysql /-DSYSCONFDIR=/etc /-DMYSQL_DATADIR=/home/mysql /-DEXTRA_CHARSETS=all /-DDEFAULT_CHARSET=utf8 /-DDEFAULT_COLLATION=utf8_general_ci /-DENABLED_LOCAL_INFILE=1 /-DWITH_MYISAM_STORAGE_ENGINE=1 /-DWITH_INNOBASE_STORAGE_ENGINE=1 /-DWITH_READLINE=1 /-DWITH_DEBUG=0 /-DMYSQL_TCP_PORT=3306 /-DMYSQL_USER=mysql /-DWITH_SSL=yes /-DENABLE_DOWNLOADS=1
#make && make install
#vim /etc/ld.so.conf
+/usr/local/mysql/lib
#ldconfig
#cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
#cp /usr/local/mysql/support-files/my-large.cnf /etc/my.cnf
#vim /etc/profile
找到# Path manipulation行,在if内部添加pathmunge /usr/local/mysql/bin
#cd /usr/local/mysql && ./scripts/mysql_install_db --user=mysql
#/etc/init.d/mysqld restart
#chkconfig --add mysqld
#cd /usr/local/mysql && ./bin/mysql_secure_installation
安装libiconv#./configure && make && make install
安装mhash#./configure && make && make install
安装libmcrypt#./configure && make && make install
安装mcrypt#./configure && make && make install
安装pcre#./configure && make && make install
安装nginx
#./configure /--prefix=/usr/local/nginx /--user=www /--group=www /--with-select_module /--with-poll_module /--with-http_ssl_module /--with-http_realip_module /--with-http_image_filter_module /--with-http_sub_module /--with-http_dav_module /--with-http_gunzip_module /--with-http_gzip_static_module /--with-http_random_index_module /--with-http_secure_link_module /--with-pcre /--without-http_uwsgi_module /--without-http_scgi_module /--without-http_geo_module /--without-http_map_module /--without-mail_pop3_module /--without-mail_imap_module /--without-mail_smtp_module /--with-http_perl_module
#make && make install
修改配置
与mysql类似的方法,添加下面内容pathmunge /usr/local/nginx/sbin
nginx启动脚本
#!/bin/sh## nginx - this script starts and stops the nginx daemon## chkconfig: - 85 15 # description:Nginx is an HTTP(S) server, HTTP(S) reverse /# proxy and IMAP/POP3 proxy server# processname: nginx# config: /etc/nginx/nginx.conf# config: /etc/sysconfig/nginx# pidfile: /var/run/nginx.pid# Source function library.. /etc/rc.d/init.d/functions# Source networking configuration.. /etc/sysconfig/network# Check that networking is up.[ "$NETWORKING" = "no" ] && exit 0nginx="/usr/local/nginx/sbin/nginx"prog=$(basename $nginx)NGINX_CONF_FILE="/usr/local/nginx/conf/nginx.conf"[ -f /etc/sysconfig/nginx ] && . /etc/sysconfig/nginxlockfile=/var/lock/subsys/nginxmake_dirs() { # make required directories user=`$nginx -V 2>&1 | grep "configure arguments:" | sed 's/[^*]*--user=/([^ ]*/).*//1/g' -` if [ -z "`grep $user /etc/passwd`" ]; then useradd -M -s /bin/nologin $user fi options=`$nginx -V 2>&1 | grep 'configure arguments:'` for opt in $options; do if [ `echo $opt | grep '.*-temp-path'` ]; then value=`echo $opt | cut -d "=" -f 2` if [ ! -d "$value" ]; then # echo "creating" $value mkdir -p $value && chown -R $user $value fi fi done}start() { [ -x $nginx ] || exit 5 [ -f $NGINX_CONF_FILE ] || exit 6 make_dirs echo -n $"Starting $prog: " daemon $nginx -c $NGINX_CONF_FILE retval=$? echo [ $retval -eq 0 ] && touch $lockfile return $retval}stop() { echo -n $"Stopping $prog: " killproc $prog -QUIT retval=$? echo [ $retval -eq 0 ] && rm -f $lockfile return $retval}restart() { configtest || return $? stop sleep 1 start}reload() { configtest || return $? echo -n $"Reloading $prog: " killproc $nginx -HUP RETVAL=$? echo}force_reload() { restart}configtest() {$nginx -t -c $NGINX_CONF_FILE}rh_status() { status $prog}rh_status_q() { rh_status >/dev/null 2>&1}case "$1" in start) rh_status_q && exit 0 $1 ;; stop) rh_status_q || exit 0 $1 ;; restart|configtest) $1 ;; reload) rh_status_q || exit 7 $1 ;; force-reload) force_reload ;; status) rh_status ;; condrestart|try-restart) rh_status_q || exit 0 ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}" exit 2esac
安装php
#./configure /--prefix=/usr/local/php /--enable-fpm /--with-fpm-user=www /--with-fpm-group=www /--with-config-file-path=/usr/local/php/etc /--disable-ipv6 /--with-openssl /--with-zlib /--enable-bcmath /--with-bz2 /--enable-calendar /--with-curl /--with-libxml-dir=/usr /--enable-exif /--with-pcre-dir=/usr/local /--enable-ftp /--with-gd /--with-jpeg-dir /--with-png-dir /--with-freetype-dir /--enable-gd-native-ttf /--with-gettext /--with-mhash /--enable-mbstring /--with-mcrypt /--with-mysql=/usr/local/mysql /--with-mysql-sock=/tmp/mysql.sock /--with-mysqli=/usr/local/mysql/bin/mysql_config /--with-pdo-mysql=/usr/local/mysql /--with-pspell /--with-readline=/usr /--enable-soap /--enable-sockets /--enable-sysvmsg /--enable-sysvsem /--enable-sysvshm /--with-xmlrpc /--with-iconv=/usr/local /--enable-zip /--with-pear /--without-sqlite3 /--without-pdo-sqlite
#make && make install``
#cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm#cp /root/phpsrc/php.ini-product /usr/local/php/etc/php.ini`
与mysql类似方法,添加下面的内容pathmunge /usr/local/php/bin
memcache配置#phpize
#./configure /--enable-memcache /--with-php-config=/usr/local/php/bin/php-config
memcached配置./configure --prefix=/usr/local/memcache --enable-64bit
基本上整个安装过程就是这样。

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

解決方法:1、檢查電驢設置,確保已輸入正確的伺服器位址和連接埠號碼;2、檢查網路連接,確保電腦已連接到互聯網,並重置路由器;3、檢查伺服器是否在線,如果您的設定和網路連線都沒有問題,則需要檢查伺服器是否在線上;4、更新電驢版本,造訪電驢官方網站,下載最新版本的電驢軟體;5、尋求協助。

RPC伺服器不可用進不了桌面怎麼辦近年來,電腦和網路已經深入到我們的生活中的各個角落。作為一種集中運算和資源共享的技術,遠端過程呼叫(RPC)在網路通訊中起著至關重要的作用。然而,有時我們可能會遇到RPC伺服器無法使用的情況,導致無法進入桌面。本文將介紹一些可能導致此問題的原因,並提供解決方案。首先,我們需要了解RPC伺服器不可用的原因。 RPC伺服器是一種

身為LINUX用戶,我們經常需要在CentOS上安裝各種軟體和伺服器,本文將詳細介紹如何在CentOS上安裝fuse和建置伺服器的過程,幫助您順利完成相關操作。 CentOS安裝fuseFuse是一個使用者空間檔案系統框架,允許非特權使用者透過自訂檔案系統實現對檔案系統的存取和操作,在CentOS上安裝fuse非常簡單,只需按照以下步驟操作:1.開啟終端,以root用戶登入。 2.使用下列指令安裝fuse軟體包:```yuminstallfuse3.確認安裝過程中的提示,輸入`y`繼續。 4.安裝完

DHCP中繼的作用是將接收到的DHCP封包轉送到網路上的另一個DHCP伺服器,即使這兩台伺服器位於不同的子網路中。透過使用DHCP中繼,您可以實現在網路中心部署集中式的DHCP伺服器,並利用它為所有網路子網路/VLAN動態分配IP位址。 Dnsmasq是一種常用的DNS和DHCP協定伺服器,可設定為DHCP中繼伺服器,以協助管理網路中的動態主機設定。在本文中,我們將向您展示如何將dnsmasq配置為DHCP中繼伺服器。內容主題:網路拓樸在DHCP中繼上設定靜態IP位址集中式DHCP伺服器上的D

在網路資料傳輸中,IP代理伺服器扮演著重要的角色,能夠幫助使用者隱藏真實IP位址,保護隱私、提升存取速度等。在本篇文章中,將介紹如何用PHP建立IP代理伺服器的最佳實務指南,並提供具體的程式碼範例。什麼是IP代理伺服器? IP代理伺服器是位於使用者與目標伺服器之間的中間伺服器,它可作為使用者與目標伺服器之間的中轉站,將使用者的請求和回應轉發。透過使用IP代理伺服器

本站7月23日消息,曝光已久的聯想YOGAPortal高性能桌上型電腦現確認將於7月27日在上海ChinaJoy正式發布,號稱是為AI專業創作而生的迷你主機。是性能高手,也是AI創作能手3D數位人,AI虛擬背景根據本站家友@豫P在上海提供的現場圖,這款小主機體積僅3.7L,整體採用陽極氧化鋁材質,搭載了英特爾酷睿i7-14700處理器,配備32GBDDR5記憶體及1TB固態硬碟。 YOGAPortal既是主機,也是AI創作一體機,高效能主機與演算法優化相機結合,形成一體化解決方案。只需站在攝影機前,即

本站6月5日消息,微星參加2024台北國際電腦展,展示了一款名為MEGVisionXAI的新旗艦遊戲電腦。這款遊戲主機是現有Vision系列的延伸,採用了非常吸睛的環繞玻璃設計,內部組件清晰可見。而最吸引人的地方在於該主機正面配備了一塊超大尺寸的觸控屏幕,微星工作人員介紹稱可以同步微星的獨家AI應用程序,進一步增強各項AI功能。本站附上相關圖片如下:微星目前並未解釋更多細節,從分享的圖片中可以看到屏幕上運行本地AI聊天機器人,用戶可以和其互動,要求其完成AI任務,定位本地存儲的文檔等。以上圖源:

金山辦公生產力大會官員宣4月9日15點舉行,宣稱「WPS365全新發布」。官方海報寫有“一站式AI辦公生產力即刻起飛”,暗示WPS365將迎來更多AI功能升級。 2023年4月,金山辦公室向政企客戶發布了數位辦公品牌WPS365,該服務提供一系列內容創作應用和辦公室協作工具,涵蓋了內容創作、溝通創作、數位資產管理、開放生態四大版塊,包含WPSOffice、文件中心、金山協作、金山會議、郵件、行事曆等通用辦公室套件。查詢WPS365官網獲悉,該服務的體驗版免費使用,商業版定價199元/人/年起,需5人起購。
