From 7dfc47a709f98f7474933833e9afe559d920f893 Mon Sep 17 00:00:00 2001 From: ppabc Date: Mon, 10 Jul 2017 21:05:35 +0800 Subject: [PATCH] update --- .../extra/httpd-autoindex.conf | 93 ++++ .../config-httpd-2.2.22/extra/httpd-dav.conf | 52 ++ .../extra/httpd-default.conf | 75 +++ .../config-httpd-2.2.22/extra/httpd-info.conf | 37 ++ .../extra/httpd-languages.conf | 141 +++++ .../extra/httpd-manual.conf | 31 ++ .../config-httpd-2.2.22/extra/httpd-mpm.conf | 110 ++++ .../extra/httpd-multilang-errordoc.conf | 52 ++ .../config-httpd-2.2.22/extra/httpd-ssl.conf | 231 ++++++++ .../extra/httpd-userdir.conf | 28 + .../extra/httpd-vhosts.conf | 27 + .../config-httpd-2.2.22/httpd.conf | 465 ++++++++++++++++ .../config-httpd-2.2.22/vhosts/phpwind.conf | 25 + .../extra/httpd-vhosts.conf | 27 + .../config-httpd-2.4.2/httpd.conf | 505 ++++++++++++++++++ .../config-httpd-2.4.2/vhosts/phpwind.conf | 25 + shell/lanmp/apache/install_httpd-2.2.29.sh | 87 +++ shell/lanmp/apache/install_httpd-2.4.10.sh | 102 ++++ shell/lanmp/env/install_dir.sh | 47 ++ shell/lanmp/env/install_disk.sh | 63 +++ shell/lanmp/env/install_env.sh | 165 ++++++ shell/lanmp/env/install_set_sysctl.sh | 37 ++ shell/lanmp/env/install_set_ulimit.sh | 14 + .../lanmp/ftp/config-ftp/apt_ftp/pam.d/vsftpd | 10 + .../ftp/config-ftp/apt_ftp/vsftpd.chroot_list | 1 + .../lanmp/ftp/config-ftp/apt_ftp/vsftpd.conf | 145 +++++ .../ftp/config-ftp/apt_ftp/vsftpd.user_list | 0 .../lanmp/ftp/config-ftp/rpm_ftp/chroot_list | 1 + shell/lanmp/ftp/config-ftp/rpm_ftp/ftpusers | 15 + shell/lanmp/ftp/config-ftp/rpm_ftp/user_list | 0 .../lanmp/ftp/config-ftp/rpm_ftp/vsftpd.conf | 192 +++++++ .../ftp/config-ftp/vsftpdcentosi686.conf | 192 +++++++ shell/lanmp/ftp/install_vsftpd-2.3.2.sh | 56 ++ shell/lanmp/install.sh | 279 ++++++++++ shell/lanmp/mysql/install_mysql-5.1.73.sh | 43 ++ shell/lanmp/mysql/install_mysql-5.5.40.sh | 43 ++ shell/lanmp/mysql/install_mysql-5.6.21.sh | 82 +++ shell/lanmp/nginx/config-nginx/fastcgi.conf | 29 + shell/lanmp/nginx/config-nginx/nginx | 79 +++ shell/lanmp/nginx/config-nginx/nginx.conf | 56 ++ .../nginx/config-nginx/rewrite/default.conf | 0 .../config-nginx/rewrite/discuz_7.2.conf | 6 + .../nginx/config-nginx/rewrite/discuz_x2.conf | 7 + .../nginx/config-nginx/rewrite/ecshop.conf | 29 + .../nginx/config-nginx/rewrite/phpcms.conf | 3 + .../nginx/config-nginx/rewrite/phpwind.conf | 5 + .../nginx/config-nginx/rewrite/shopex.conf | 1 + .../nginx/config-nginx/rewrite/wordpress.conf | 11 + .../config-nginx/vhosts/default.conf.bak | 24 + .../nginx/config-nginx/vhosts/phpwind.conf | 24 + shell/lanmp/nginx/install_nginx-1.0.15.sh | 33 ++ shell/lanmp/nginx/install_nginx-1.2.5.sh | 33 ++ shell/lanmp/nginx/install_nginx-1.4.4.sh | 33 ++ shell/lanmp/nginx/install_nginx-1.8.1.sh | 33 ++ shell/lanmp/php/install_httpd_php-5.3.29.sh | 60 +++ shell/lanmp/php/install_httpd_php-5.4.23.sh | 60 +++ shell/lanmp/php/install_httpd_php-5.5.7.sh | 61 +++ shell/lanmp/php/install_nginx_php-5.3.29.sh | 74 +++ shell/lanmp/php/install_nginx_php-5.4.23.sh | 72 +++ shell/lanmp/php/install_nginx_php-5.5.7.sh | 73 +++ shell/lanmp/php/install_php_extension.sh | 73 +++ shell/lanmp/readme.php | 42 ++ shell/lanmp/res/init_mysql.php | 26 + shell/lanmp/res/install_soft.sh | 27 + shell/lanmp/res/rhel-debuginfo.repo | 43 ++ shell/lanmp/uninstall.sh | 146 +++++ 66 files changed, 4661 insertions(+) create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-autoindex.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-dav.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-default.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-info.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-languages.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-manual.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-mpm.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-multilang-errordoc.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-ssl.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-userdir.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-vhosts.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/httpd.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.2.22/vhosts/phpwind.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.4.2/extra/httpd-vhosts.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.4.2/httpd.conf create mode 100644 shell/lanmp/apache/config-httpd/config-httpd-2.4.2/vhosts/phpwind.conf create mode 100644 shell/lanmp/apache/install_httpd-2.2.29.sh create mode 100644 shell/lanmp/apache/install_httpd-2.4.10.sh create mode 100644 shell/lanmp/env/install_dir.sh create mode 100644 shell/lanmp/env/install_disk.sh create mode 100644 shell/lanmp/env/install_env.sh create mode 100644 shell/lanmp/env/install_set_sysctl.sh create mode 100644 shell/lanmp/env/install_set_ulimit.sh create mode 100644 shell/lanmp/ftp/config-ftp/apt_ftp/pam.d/vsftpd create mode 100644 shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.chroot_list create mode 100644 shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.conf create mode 100644 shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.user_list create mode 100644 shell/lanmp/ftp/config-ftp/rpm_ftp/chroot_list create mode 100644 shell/lanmp/ftp/config-ftp/rpm_ftp/ftpusers create mode 100644 shell/lanmp/ftp/config-ftp/rpm_ftp/user_list create mode 100644 shell/lanmp/ftp/config-ftp/rpm_ftp/vsftpd.conf create mode 100644 shell/lanmp/ftp/config-ftp/vsftpdcentosi686.conf create mode 100644 shell/lanmp/ftp/install_vsftpd-2.3.2.sh create mode 100644 shell/lanmp/install.sh create mode 100644 shell/lanmp/mysql/install_mysql-5.1.73.sh create mode 100644 shell/lanmp/mysql/install_mysql-5.5.40.sh create mode 100644 shell/lanmp/mysql/install_mysql-5.6.21.sh create mode 100644 shell/lanmp/nginx/config-nginx/fastcgi.conf create mode 100644 shell/lanmp/nginx/config-nginx/nginx create mode 100644 shell/lanmp/nginx/config-nginx/nginx.conf create mode 100644 shell/lanmp/nginx/config-nginx/rewrite/default.conf create mode 100644 shell/lanmp/nginx/config-nginx/rewrite/discuz_7.2.conf create mode 100644 shell/lanmp/nginx/config-nginx/rewrite/discuz_x2.conf create mode 100644 shell/lanmp/nginx/config-nginx/rewrite/ecshop.conf create mode 100644 shell/lanmp/nginx/config-nginx/rewrite/phpcms.conf create mode 100644 shell/lanmp/nginx/config-nginx/rewrite/phpwind.conf create mode 100644 shell/lanmp/nginx/config-nginx/rewrite/shopex.conf create mode 100644 shell/lanmp/nginx/config-nginx/rewrite/wordpress.conf create mode 100644 shell/lanmp/nginx/config-nginx/vhosts/default.conf.bak create mode 100644 shell/lanmp/nginx/config-nginx/vhosts/phpwind.conf create mode 100644 shell/lanmp/nginx/install_nginx-1.0.15.sh create mode 100644 shell/lanmp/nginx/install_nginx-1.2.5.sh create mode 100644 shell/lanmp/nginx/install_nginx-1.4.4.sh create mode 100644 shell/lanmp/nginx/install_nginx-1.8.1.sh create mode 100644 shell/lanmp/php/install_httpd_php-5.3.29.sh create mode 100644 shell/lanmp/php/install_httpd_php-5.4.23.sh create mode 100644 shell/lanmp/php/install_httpd_php-5.5.7.sh create mode 100644 shell/lanmp/php/install_nginx_php-5.3.29.sh create mode 100644 shell/lanmp/php/install_nginx_php-5.4.23.sh create mode 100644 shell/lanmp/php/install_nginx_php-5.5.7.sh create mode 100644 shell/lanmp/php/install_php_extension.sh create mode 100644 shell/lanmp/readme.php create mode 100644 shell/lanmp/res/init_mysql.php create mode 100644 shell/lanmp/res/install_soft.sh create mode 100644 shell/lanmp/res/rhel-debuginfo.repo create mode 100644 shell/lanmp/uninstall.sh diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-autoindex.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-autoindex.conf new file mode 100644 index 0000000..8131a99 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-autoindex.conf @@ -0,0 +1,93 @@ +# +# Directives controlling the display of server-generated directory listings. +# +# Required modules: mod_autoindex, mod_alias +# +# To see the listing of a directory, the Options directive for the +# directory must include "Indexes", and the directory must not contain +# a file matching those listed in the DirectoryIndex directive. +# + +# +# IndexOptions: Controls the appearance of server-generated directory +# listings. +# +IndexOptions FancyIndexing HTMLTable VersionSort + +# We include the /icons/ alias for FancyIndexed directory listings. If +# you do not use FancyIndexing, you may comment this out. +# +Alias /icons/ "/alidata/server/httpd/icons/" + + + Options Indexes MultiViews + AllowOverride None + Order allow,deny + Allow from all + + +# +# AddIcon* directives tell the server which icon to show for different +# files or filename extensions. These are only displayed for +# FancyIndexed directories. +# +AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip + +AddIconByType (TXT,/icons/text.gif) text/* +AddIconByType (IMG,/icons/image2.gif) image/* +AddIconByType (SND,/icons/sound2.gif) audio/* +AddIconByType (VID,/icons/movie.gif) video/* + +AddIcon /icons/binary.gif .bin .exe +AddIcon /icons/binhex.gif .hqx +AddIcon /icons/tar.gif .tar +AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv +AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip +AddIcon /icons/a.gif .ps .ai .eps +AddIcon /icons/layout.gif .html .shtml .htm .pdf +AddIcon /icons/text.gif .txt +AddIcon /icons/c.gif .c +AddIcon /icons/p.gif .pl .py +AddIcon /icons/f.gif .for +AddIcon /icons/dvi.gif .dvi +AddIcon /icons/uuencoded.gif .uu +AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl +AddIcon /icons/tex.gif .tex +AddIcon /icons/bomb.gif core + +AddIcon /icons/back.gif .. +AddIcon /icons/hand.right.gif README +AddIcon /icons/folder.gif ^^DIRECTORY^^ +AddIcon /icons/blank.gif ^^BLANKICON^^ + +# +# DefaultIcon is which icon to show for files which do not have an icon +# explicitly set. +# +DefaultIcon /icons/unknown.gif + +# +# AddDescription allows you to place a short description after a file in +# server-generated indexes. These are only displayed for FancyIndexed +# directories. +# Format: AddDescription "description" filename +# +#AddDescription "GZIP compressed document" .gz +#AddDescription "tar archive" .tar +#AddDescription "GZIP compressed tar archive" .tgz + +# +# ReadmeName is the name of the README file the server will look for by +# default, and append to directory listings. +# +# HeaderName is the name of a file which should be prepended to +# directory indexes. +ReadmeName README.html +HeaderName HEADER.html + +# +# IndexIgnore is a set of filenames which directory indexing should ignore +# and not include in the listing. Shell-style wildcarding is permitted. +# +IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t + diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-dav.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-dav.conf new file mode 100644 index 0000000..9d7aff3 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-dav.conf @@ -0,0 +1,52 @@ +# +# Distributed authoring and versioning (WebDAV) +# +# Required modules: mod_dav, mod_dav_fs, mod_setenvif, mod_alias +# mod_auth_digest, mod_authn_file +# + +# The following example gives DAV write access to a directory called +# "uploads" under the ServerRoot directory. +# +# The User/Group specified in httpd.conf needs to have write permissions +# on the directory where the DavLockDB is placed and on any directory where +# "Dav On" is specified. + +DavLockDB "/alidata/server/httpd/var/DavLock" + +Alias /uploads "/alidata/server/httpd/uploads" + + + Dav On + + Order Allow,Deny + Allow from all + + AuthType Digest + AuthName DAV-upload + + # You can use the htdigest program to create the password database: + # htdigest -c "/alidata/server/httpd/user.passwd" DAV-upload admin + AuthUserFile "/alidata/server/httpd/user.passwd" + AuthDigestProvider file + + # Allow universal read-access, but writes are restricted + # to the admin user. + + require user admin + + + +# +# The following directives disable redirects on non-GET requests for +# a directory that does not include the trailing slash. This fixes a +# problem with several clients that do not appropriately handle +# redirects for folders with DAV methods. +# +BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully +BrowserMatch "MS FrontPage" redirect-carefully +BrowserMatch "^WebDrive" redirect-carefully +BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully +BrowserMatch "^gnome-vfs/1.0" redirect-carefully +BrowserMatch "^XML Spy" redirect-carefully +BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-default.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-default.conf new file mode 100644 index 0000000..efeca05 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-default.conf @@ -0,0 +1,75 @@ +# +# This configuration file reflects default settings for Apache HTTP Server. +# +# You may change these, but chances are that you may not need to. +# + +# +# Timeout: The number of seconds before receives and sends time out. +# +Timeout 300 + +# +# KeepAlive: Whether or not to allow persistent connections (more than +# one request per connection). Set to "Off" to deactivate. +# +KeepAlive On + +# +# MaxKeepAliveRequests: The maximum number of requests to allow +# during a persistent connection. Set to 0 to allow an unlimited amount. +# We recommend you leave this number high, for maximum performance. +# +MaxKeepAliveRequests 100 + +# +# KeepAliveTimeout: Number of seconds to wait for the next request from the +# same client on the same connection. +# +KeepAliveTimeout 5 + +# +# UseCanonicalName: Determines how Apache constructs self-referencing +# URLs and the SERVER_NAME and SERVER_PORT variables. +# When set "Off", Apache will use the Hostname and Port supplied +# by the client. When set "On", Apache will use the value of the +# ServerName directive. +# +UseCanonicalName Off + +# +# AccessFileName: The name of the file to look for in each directory +# for additional configuration directives. See also the AllowOverride +# directive. +# +AccessFileName .htaccess + +# +# ServerTokens +# This directive configures what you return as the Server HTTP response +# Header. The default is 'Full' which sends information about the OS-Type +# and compiled in modules. +# Set to one of: Full | OS | Minor | Minimal | Major | Prod +# where Full conveys the most information, and Prod the least. +# +ServerTokens Full + +# +# Optionally add a line containing the server version and virtual host +# name to server-generated pages (internal error documents, FTP directory +# listings, mod_status and mod_info output etc., but not CGI generated +# documents or custom error documents). +# Set to "EMail" to also include a mailto: link to the ServerAdmin. +# Set to one of: On | Off | EMail +# +ServerSignature On + +# +# HostnameLookups: Log the names of clients or just their IP addresses +# e.g., www.apache.org (on) or 204.62.129.132 (off). +# The default is off because it'd be overall better for the net if people +# had to knowingly turn this feature on, since enabling it means that +# each client request will result in AT LEAST one lookup request to the +# nameserver. +# +HostnameLookups Off diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-info.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-info.conf new file mode 100644 index 0000000..db316c0 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-info.conf @@ -0,0 +1,37 @@ +# +# Get information about the requests being processed by the server +# and the configuration of the server. +# +# Required modules: mod_status (for the server-status handler), +# mod_info (for the server-info handler) + +# +# Allow server status reports generated by mod_status, +# with the URL of http://servername/server-status +# Change the ".example.com" to match your domain to enable. + + + SetHandler server-status + Order deny,allow + Deny from all + Allow from .example.com + + +# +# ExtendedStatus controls whether Apache will generate "full" status +# information (ExtendedStatus On) or just basic information (ExtendedStatus +# Off) when the "server-status" handler is called. The default is Off. +# +#ExtendedStatus On + +# +# Allow remote server configuration reports, with the URL of +# http://servername/server-info (requires that mod_info.c be loaded). +# Change the ".example.com" to match your domain to enable. +# + + SetHandler server-info + Order deny,allow + Deny from all + Allow from .example.com + diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-languages.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-languages.conf new file mode 100644 index 0000000..7f66461 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-languages.conf @@ -0,0 +1,141 @@ +# +# Settings for hosting different languages. +# +# Required modules: mod_mime, mod_negotiation + +# DefaultLanguage and AddLanguage allows you to specify the language of +# a document. You can then use content negotiation to give a browser a +# file in a language the user can understand. +# +# Specify a default language. This means that all data +# going out without a specific language tag (see below) will +# be marked with this one. You probably do NOT want to set +# this unless you are sure it is correct for all cases. +# +# * It is generally better to not mark a page as +# * being a certain language than marking it with the wrong +# * language! +# +# DefaultLanguage nl +# +# Note 1: The suffix does not have to be the same as the language +# keyword --- those with documents in Polish (whose net-standard +# language code is pl) may wish to use "AddLanguage pl .po" to +# avoid the ambiguity with the common suffix for perl scripts. +# +# Note 2: The example entries below illustrate that in some cases +# the two character 'Language' abbreviation is not identical to +# the two character 'Country' code for its country, +# E.g. 'Danmark/dk' versus 'Danish/da'. +# +# Note 3: In the case of 'ltz' we violate the RFC by using a three char +# specifier. There is 'work in progress' to fix this and get +# the reference data for rfc1766 cleaned up. +# +# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) +# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) +# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) +# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) +# Norwegian (no) - Polish (pl) - Portugese (pt) +# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) +# Turkish (tr) - Simplified Chinese (zh-CN) - Spanish (es) +# Traditional Chinese (zh-TW) +# +AddLanguage ca .ca +AddLanguage cs .cz .cs +AddLanguage da .dk +AddLanguage de .de +AddLanguage el .el +AddLanguage en .en +AddLanguage eo .eo +AddLanguage es .es +AddLanguage et .et +AddLanguage fr .fr +AddLanguage he .he +AddLanguage hr .hr +AddLanguage it .it +AddLanguage ja .ja +AddLanguage ko .ko +AddLanguage ltz .ltz +AddLanguage nl .nl +AddLanguage nn .nn +AddLanguage no .no +AddLanguage pl .po +AddLanguage pt .pt +AddLanguage pt-BR .pt-br +AddLanguage ru .ru +AddLanguage sv .sv +AddLanguage tr .tr +AddLanguage zh-CN .zh-cn +AddLanguage zh-TW .zh-tw + +# LanguagePriority allows you to give precedence to some languages +# in case of a tie during content negotiation. +# +# Just list the languages in decreasing order of preference. We have +# more or less alphabetized them here. You probably want to change this. +# +LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW + +# +# ForceLanguagePriority allows you to serve a result page rather than +# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) +# [in case no accepted languages matched the available variants] +# +ForceLanguagePriority Prefer Fallback + +# +# Commonly used filename extensions to character sets. You probably +# want to avoid clashes with the language extensions, unless you +# are good at carefully testing your setup after each change. +# See http://www.iana.org/assignments/character-sets for the +# official list of charset names and their respective RFCs. +# +AddCharset us-ascii.ascii .us-ascii +AddCharset ISO-8859-1 .iso8859-1 .latin1 +AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen +AddCharset ISO-8859-3 .iso8859-3 .latin3 +AddCharset ISO-8859-4 .iso8859-4 .latin4 +AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru +AddCharset ISO-8859-6 .iso8859-6 .arb .arabic +AddCharset ISO-8859-7 .iso8859-7 .grk .greek +AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew +AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk +AddCharset ISO-8859-10 .iso8859-10 .latin6 +AddCharset ISO-8859-13 .iso8859-13 +AddCharset ISO-8859-14 .iso8859-14 .latin8 +AddCharset ISO-8859-15 .iso8859-15 .latin9 +AddCharset ISO-8859-16 .iso8859-16 .latin10 +AddCharset ISO-2022-JP .iso2022-jp .jis +AddCharset ISO-2022-KR .iso2022-kr .kis +AddCharset ISO-2022-CN .iso2022-cn .cis +AddCharset Big5.Big5 .big5 .b5 +AddCharset cn-Big5 .cn-big5 +# For russian, more than one charset is used (depends on client, mostly): +AddCharset WINDOWS-1251 .cp-1251 .win-1251 +AddCharset CP866 .cp866 +AddCharset KOI8 .koi8 +AddCharset KOI8-E .koi8-e +AddCharset KOI8-r .koi8-r .koi8-ru +AddCharset KOI8-U .koi8-u +AddCharset KOI8-ru .koi8-uk .ua +AddCharset ISO-10646-UCS-2 .ucs2 +AddCharset ISO-10646-UCS-4 .ucs4 +AddCharset UTF-7 .utf7 +AddCharset UTF-8 .utf8 +AddCharset UTF-16 .utf16 +AddCharset UTF-16BE .utf16be +AddCharset UTF-16LE .utf16le +AddCharset UTF-32 .utf32 +AddCharset UTF-32BE .utf32be +AddCharset UTF-32LE .utf32le +AddCharset euc-cn .euc-cn +AddCharset euc-gb .euc-gb +AddCharset euc-jp .euc-jp +AddCharset euc-kr .euc-kr +#Not sure how euc-tw got in - IANA doesn't list it??? +AddCharset EUC-TW .euc-tw +AddCharset gb2312 .gb2312 .gb +AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 +AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 +AddCharset shift_jis .shift_jis .sjis diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-manual.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-manual.conf new file mode 100644 index 0000000..f2b2ce4 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-manual.conf @@ -0,0 +1,31 @@ +# +# Provide access to the documentation on your server as +# http://yourserver.example.com/manual/ +# The documentation is always available at +# http://httpd.apache.org/docs/2.2/ +# +# Required modules: mod_alias, mod_setenvif, mod_negotiation +# + +AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|pt-br|ru|tr))?(/.*)?$ "/alidata/server/httpd/manual$1" + + + Options Indexes + AllowOverride None + Order allow,deny + Allow from all + + + SetHandler type-map + + # .tr is text/troff in mime.types! + + ForceType text/html + + + SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|pt-br|ru|tr)/ prefer-language=$1 + RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|pt-br|ru|tr)){2,}(/.*)?$ /manual/$1$2 + + LanguagePriority en de es fr ja ko pt-br ru tr + ForceLanguagePriority Prefer Fallback + diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-mpm.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-mpm.conf new file mode 100644 index 0000000..8c44c60 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-mpm.conf @@ -0,0 +1,110 @@ +# +# Server-Pool Management (MPM specific) +# + +# +# PidFile: The file in which the server should record its process +# identification number when it starts. +# +# Note that this is the default PidFile for most MPMs. +# + + PidFile "logs/httpd.pid" + + +# +# The accept serialization lock file MUST BE STORED ON A LOCAL DISK. +# + + +LockFile "logs/accept.lock" + + + +# +# Only one of the below sections will be relevant on your +# installed httpd. Use "apachectl -l" to find out the +# active mpm. +# + +# prefork MPM +# StartServers: number of server processes to start +# MinSpareServers: minimum number of server processes which are kept spare +# MaxSpareServers: maximum number of server processes which are kept spare +# MaxClients: maximum number of server processes allowed to start +# MaxRequestsPerChild: maximum number of requests a server process serves + + StartServers 5 + MinSpareServers 5 + MaxSpareServers 10 + MaxClients 150 + MaxRequestsPerChild 0 + + +# worker MPM +# StartServers: initial number of server processes to start +# MaxClients: maximum number of simultaneous client connections +# MinSpareThreads: minimum number of worker threads which are kept spare +# MaxSpareThreads: maximum number of worker threads which are kept spare +# ThreadsPerChild: constant number of worker threads in each server process +# MaxRequestsPerChild: maximum number of requests a server process serves + + StartServers 2 + MaxClients 150 + MinSpareThreads 25 + MaxSpareThreads 75 + ThreadsPerChild 25 + MaxRequestsPerChild 0 + + +# BeOS MPM +# StartThreads: how many threads do we initially spawn? +# MaxClients: max number of threads we can have (1 thread == 1 client) +# MaxRequestsPerThread: maximum number of requests each thread will process + + StartThreads 10 + MaxClients 50 + MaxRequestsPerThread 10000 + + +# NetWare MPM +# ThreadStackSize: Stack size allocated for each worker thread +# StartThreads: Number of worker threads launched at server startup +# MinSpareThreads: Minimum number of idle threads, to handle request spikes +# MaxSpareThreads: Maximum number of idle threads +# MaxThreads: Maximum number of worker threads alive at the same time +# MaxRequestsPerChild: Maximum number of requests a thread serves. It is +# recommended that the default value of 0 be set for this +# directive on NetWare. This will allow the thread to +# continue to service requests indefinitely. + + ThreadStackSize 65536 + StartThreads 250 + MinSpareThreads 25 + MaxSpareThreads 250 + MaxThreads 1000 + MaxRequestsPerChild 0 + MaxMemFree 100 + + +# OS/2 MPM +# StartServers: Number of server processes to maintain +# MinSpareThreads: Minimum number of idle threads per process, +# to handle request spikes +# MaxSpareThreads: Maximum number of idle threads per process +# MaxRequestsPerChild: Maximum number of connections per server process + + StartServers 2 + MinSpareThreads 5 + MaxSpareThreads 10 + MaxRequestsPerChild 0 + + +# WinNT MPM +# ThreadsPerChild: constant number of worker threads in the server process +# MaxRequestsPerChild: maximum number of requests a server process serves + + ThreadsPerChild 150 + MaxRequestsPerChild 0 + + diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-multilang-errordoc.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-multilang-errordoc.conf new file mode 100644 index 0000000..00426a7 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-multilang-errordoc.conf @@ -0,0 +1,52 @@ +# +# The configuration below implements multi-language error documents through +# content-negotiation. +# +# Required modules: mod_alias, mod_include, mod_negotiation +# +# We use Alias to redirect any /error/HTTP_.html.var response to +# our collection of by-error message multi-language collections. We use +# includes to substitute the appropriate text. +# +# You can modify the messages' appearance without changing any of the +# default HTTP_.html.var files by adding the line: +# +# Alias /error/include/ "/your/include/path/" +# +# which allows you to create your own set of files by starting with the +# /alidata/server/httpd/error/include/ files and copying them to /your/include/path/, +# even on a per-VirtualHost basis. The default include files will display +# your Apache version number and your ServerAdmin email address regardless +# of the setting of ServerSignature. + +Alias /error/ "/alidata/server/httpd/error/" + + + AllowOverride None + Options IncludesNoExec + AddOutputFilter Includes html + AddHandler type-map var + Order allow,deny + Allow from all + LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr + ForceLanguagePriority Prefer Fallback + + +ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var +ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var +ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var +ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var +ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var +ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var +ErrorDocument 410 /error/HTTP_GONE.html.var +ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var +ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var +ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var +ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var +ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var +ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var +ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var +ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var +ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var +ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var + diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-ssl.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-ssl.conf new file mode 100644 index 0000000..5ee8fd9 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-ssl.conf @@ -0,0 +1,231 @@ +# +# This is the Apache server configuration file providing SSL support. +# It contains the configuration directives to instruct the server how to +# serve pages over an https connection. For detailing information about these +# directives see +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. You have been warned. +# + +# +# Pseudo Random Number Generator (PRNG): +# Configure one or more sources to seed the PRNG of the SSL library. +# The seed data should be of good random quality. +# WARNING! On some platforms /dev/random blocks if not enough entropy +# is available. This means you then cannot use the /dev/random device +# because it would lead to very long connection times (as long as +# it requires to make more entropy available). But usually those +# platforms additionally provide a /dev/urandom device which doesn't +# block. So, if available, use this one instead. Read the mod_ssl User +# Manual for more details. +# +#SSLRandomSeed startup file:/dev/random 512 +#SSLRandomSeed startup file:/dev/urandom 512 +#SSLRandomSeed connect file:/dev/random 512 +#SSLRandomSeed connect file:/dev/urandom 512 + + +# +# When we also provide SSL we have to listen to the +# standard HTTP port (see above) and to the HTTPS port +# +# Note: Configurations that use IPv6 but not IPv4-mapped addresses need two +# Listen directives: "Listen [::]:443" and "Listen 0.0.0.0:443" +# +Listen 443 + +## +## SSL Global Context +## +## All SSL configuration in this context applies both to +## the main server and all SSL-enabled virtual hosts. +## + +# +# Some MIME-types for downloading Certificates and CRLs +# +AddType application/x-x509-ca-cert .crt +AddType application/x-pkcs7-crl .crl + +# Pass Phrase Dialog: +# Configure the pass phrase gathering process. +# The filtering dialog program (`builtin' is a internal +# terminal dialog) has to provide the pass phrase on stdout. +SSLPassPhraseDialog builtin + +# Inter-Process Session Cache: +# Configure the SSL Session Cache: First the mechanism +# to use and second the expiring timeout (in seconds). +#SSLSessionCache "dbm:/alidata/server/httpd/logs/ssl_scache" +SSLSessionCache "shmcb:/alidata/server/httpd/logs/ssl_scache(512000)" +SSLSessionCacheTimeout 300 + +# Semaphore: +# Configure the path to the mutual exclusion semaphore the +# SSL engine uses internally for inter-process synchronization. +SSLMutex "file:/alidata/server/httpd/logs/ssl_mutex" + +## +## SSL Virtual Host Context +## + + + +# General setup for the virtual host +DocumentRoot "/alidata/server/httpd/htdocs" +ServerName www.example.com:443 +ServerAdmin you@example.com +ErrorLog "/alidata/server/httpd/logs/error_log" +TransferLog "/alidata/server/httpd/logs/access_log" + +# SSL Engine Switch: +# Enable/Disable SSL for this virtual host. +SSLEngine on + +# SSL Cipher Suite: +# List the ciphers that the client is permitted to negotiate. +# See the mod_ssl documentation for a complete list. +SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL + +# Server Certificate: +# Point SSLCertificateFile at a PEM encoded certificate. If +# the certificate is encrypted, then you will be prompted for a +# pass phrase. Note that a kill -HUP will prompt again. Keep +# in mind that if you have both an RSA and a DSA certificate you +# can configure both in parallel (to also allow the use of DSA +# ciphers, etc.) +SSLCertificateFile "/alidata/server/httpd/conf/server.crt" +#SSLCertificateFile "/alidata/server/httpd/conf/server-dsa.crt" + +# Server Private Key: +# If the key is not combined with the certificate, use this +# directive to point at the key file. Keep in mind that if +# you've both a RSA and a DSA private key you can configure +# both in parallel (to also allow the use of DSA ciphers, etc.) +SSLCertificateKeyFile "/alidata/server/httpd/conf/server.key" +#SSLCertificateKeyFile "/alidata/server/httpd/conf/server-dsa.key" + +# Server Certificate Chain: +# Point SSLCertificateChainFile at a file containing the +# concatenation of PEM encoded CA certificates which form the +# certificate chain for the server certificate. Alternatively +# the referenced file can be the same as SSLCertificateFile +# when the CA certificates are directly appended to the server +# certificate for convinience. +#SSLCertificateChainFile "/alidata/server/httpd/conf/server-ca.crt" + +# Certificate Authority (CA): +# Set the CA certificate verification path where to find CA +# certificates for client authentication or alternatively one +# huge file containing all of them (file must be PEM encoded) +# Note: Inside SSLCACertificatePath you need hash symlinks +# to point to the certificate files. Use the provided +# Makefile to update the hash symlinks after changes. +#SSLCACertificatePath "/alidata/server/httpd/conf/ssl.crt" +#SSLCACertificateFile "/alidata/server/httpd/conf/ssl.crt/ca-bundle.crt" + +# Certificate Revocation Lists (CRL): +# Set the CA revocation path where to find CA CRLs for client +# authentication or alternatively one huge file containing all +# of them (file must be PEM encoded) +# Note: Inside SSLCARevocationPath you need hash symlinks +# to point to the certificate files. Use the provided +# Makefile to update the hash symlinks after changes. +#SSLCARevocationPath "/alidata/server/httpd/conf/ssl.crl" +#SSLCARevocationFile "/alidata/server/httpd/conf/ssl.crl/ca-bundle.crl" + +# Client Authentication (Type): +# Client certificate verification type and depth. Types are +# none, optional, require and optional_no_ca. Depth is a +# number which specifies how deeply to verify the certificate +# issuer chain before deciding the certificate is not valid. +#SSLVerifyClient require +#SSLVerifyDepth 10 + +# Access Control: +# With SSLRequire you can do per-directory access control based +# on arbitrary complex boolean expressions containing server +# variable checks and other lookup directives. The syntax is a +# mixture between C and Perl. See the mod_ssl documentation +# for more details. +# +#SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ +# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ +# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ +# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ +# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ +# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ +# + +# SSL Engine Options: +# Set various options for the SSL engine. +# o FakeBasicAuth: +# Translate the client X.509 into a Basic Authorisation. This means that +# the standard Auth/DBMAuth methods can be used for access control. The +# user name is the `one line' version of the client's X.509 certificate. +# Note that no password is obtained from the user. Every entry in the user +# file needs this password: `xxj31ZMTZzkVA'. +# o ExportCertData: +# This exports two additional environment variables: SSL_CLIENT_CERT and +# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the +# server (always existing) and the client (only existing when client +# authentication is used). This can be used to import the certificates +# into CGI scripts. +# o StdEnvVars: +# This exports the standard SSL/TLS related `SSL_*' environment variables. +# Per default this exportation is switched off for performance reasons, +# because the extraction step is an expensive operation and is usually +# useless for serving static content. So one usually enables the +# exportation for CGI and SSI requests only. +# o StrictRequire: +# This denies access when "SSLRequireSSL" or "SSLRequire" applied even +# under a "Satisfy any" situation, i.e. when it applies access is denied +# and no other module can change it. +# o OptRenegotiate: +# This enables optimized SSL connection renegotiation handling when SSL +# directives are used in per-directory context. +#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + +# SSL Protocol Adjustments: +# The safe and default but still SSL/TLS standard compliant shutdown +# approach is that mod_ssl sends the close notify alert but doesn't wait for +# the close notify alert from client. When you need a different shutdown +# approach you can use one of the following variables: +# o ssl-unclean-shutdown: +# This forces an unclean shutdown when the connection is closed, i.e. no +# SSL close notify alert is send or allowed to received. This violates +# the SSL/TLS standard but is needed for some brain-dead browsers. Use +# this when you receive I/O errors because of the standard approach where +# mod_ssl sends the close notify alert. +# o ssl-accurate-shutdown: +# This forces an accurate shutdown when the connection is closed, i.e. a +# SSL close notify alert is send and mod_ssl waits for the close notify +# alert of the client. This is 100% SSL/TLS standard compliant, but in +# practice often causes hanging connections with brain-dead browsers. Use +# this only for browsers where you know that their SSL implementation +# works correctly. +# Notice: Most problems of broken clients are also related to the HTTP +# keep-alive facility, so you usually additionally want to disable +# keep-alive for those clients, too. Use variable "nokeepalive" for this. +# Similarly, one has to force some clients to use HTTP/1.0 to workaround +# their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and +# "force-response-1.0" for this. +BrowserMatch ".*MSIE.*" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + +# Per-Server Logging: +# The home of a custom SSL log file. Use this when you want a +# compact non-error SSL logfile on a virtual host basis. +CustomLog "/alidata/server/httpd/logs/ssl_request_log" \ + "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" + + diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-userdir.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-userdir.conf new file mode 100644 index 0000000..567bd6d --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-userdir.conf @@ -0,0 +1,28 @@ +# Settings for user home directories +# +# Required module: mod_userdir + +# +# UserDir: The name of the directory that is appended onto a user's home +# directory if a ~user request is received. Note that you must also set +# the default access control for these directories, as in the example below. +# +UserDir public_html + +# +# Control access to UserDir directories. The following is an example +# for a site where these directories are restricted to read-only. +# + + AllowOverride FileInfo AuthConfig Limit Indexes + Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec + + Order allow,deny + Allow from all + + + Order deny,allow + Deny from all + + + diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-vhosts.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-vhosts.conf new file mode 100644 index 0000000..7cd9eb9 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/extra/httpd-vhosts.conf @@ -0,0 +1,27 @@ +# +# Virtual Hosts +# +# If you want to maintain multiple domains/hostnames on your +# machine you can setup VirtualHost containers for them. Most configurations +# use only name-based virtual hosts so the server doesn't need to worry about +# IP addresses. This is indicated by the asterisks in the directives below. +# +# Please see the documentation at +# +# for further details before you try to setup virtual hosts. +# +# You may use the command line option '-S' to verify your virtual host +# configuration. + +# +# Use name-based virtual hosting. +# +NameVirtualHost *:80 + +# +# VirtualHost example: +# Almost any Apache directive may go into a VirtualHost container. +# The first VirtualHost section is used for all requests that do not +# match a ServerName or ServerAlias in any block. +# +Include /alidata/server/httpd/conf/vhosts/*.conf \ No newline at end of file diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/httpd.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/httpd.conf new file mode 100644 index 0000000..8a63e7e --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/httpd.conf @@ -0,0 +1,465 @@ +# +# This is the main Apache HTTP server configuration file. It contains the +# configuration directives that give the server its instructions. +# See for detailed information. +# In particular, see +# +# for a discussion of each configuration directive. +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. You have been warned. +# +# Configuration and logfile names: If the filenames you specify for many +# of the server's control files begin with "/" (or "drive:/" for Win32), the +# server will use that explicit path. If the filenames do *not* begin +# with "/", the value of ServerRoot is prepended -- so "logs/foo_log" +# with ServerRoot set to "/alidata/server/httpd" will be interpreted by the +# server as "/alidata/server/httpd/logs/foo_log". + +# +# ServerRoot: The top of the directory tree under which the server's +# configuration, error, and log files are kept. +# +# Do not add a slash at the end of the directory path. If you point +# ServerRoot at a non-local disk, be sure to point the LockFile directive +# at a local disk. If you wish to share the same ServerRoot for multiple +# httpd daemons, you will need to change at least LockFile and PidFile. +# +ServerRoot "/alidata/server/httpd" + +# +# Listen: Allows you to bind Apache to specific IP addresses and/or +# ports, instead of the default. See also the +# directive. +# +# Change this to Listen on specific IP addresses as shown below to +# prevent Apache from glomming onto all bound IP addresses. +# +#Listen 12.34.56.78:80 +Listen 80 + +# +# Dynamic Shared Object (DSO) Support +# +# To be able to use the functionality of a module which was built as a DSO you +# have to place corresponding `LoadModule' lines at this location so the +# directives contained in it are actually available _before_ they are used. +# Statically compiled modules (those listed by `httpd -l') do not need +# to be loaded here. +# +# Example: +# LoadModule foo_module modules/mod_foo.so +# +LoadModule authn_file_module modules/mod_authn_file.so +LoadModule authn_dbm_module modules/mod_authn_dbm.so +LoadModule authn_anon_module modules/mod_authn_anon.so +LoadModule authn_dbd_module modules/mod_authn_dbd.so +LoadModule authn_default_module modules/mod_authn_default.so +LoadModule authz_host_module modules/mod_authz_host.so +LoadModule authz_groupfile_module modules/mod_authz_groupfile.so +LoadModule authz_user_module modules/mod_authz_user.so +LoadModule authz_dbm_module modules/mod_authz_dbm.so +LoadModule authz_owner_module modules/mod_authz_owner.so +LoadModule authz_default_module modules/mod_authz_default.so +LoadModule auth_basic_module modules/mod_auth_basic.so +LoadModule auth_digest_module modules/mod_auth_digest.so +LoadModule file_cache_module modules/mod_file_cache.so +LoadModule cache_module modules/mod_cache.so +LoadModule disk_cache_module modules/mod_disk_cache.so +LoadModule mem_cache_module modules/mod_mem_cache.so +LoadModule dbd_module modules/mod_dbd.so +LoadModule dumpio_module modules/mod_dumpio.so +LoadModule reqtimeout_module modules/mod_reqtimeout.so +LoadModule ext_filter_module modules/mod_ext_filter.so +LoadModule include_module modules/mod_include.so +LoadModule filter_module modules/mod_filter.so +LoadModule substitute_module modules/mod_substitute.so +LoadModule deflate_module modules/mod_deflate.so +LoadModule log_config_module modules/mod_log_config.so +LoadModule log_forensic_module modules/mod_log_forensic.so +LoadModule logio_module modules/mod_logio.so +LoadModule env_module modules/mod_env.so +LoadModule mime_magic_module modules/mod_mime_magic.so +LoadModule cern_meta_module modules/mod_cern_meta.so +LoadModule expires_module modules/mod_expires.so +LoadModule headers_module modules/mod_headers.so +LoadModule ident_module modules/mod_ident.so +LoadModule usertrack_module modules/mod_usertrack.so +LoadModule unique_id_module modules/mod_unique_id.so +LoadModule setenvif_module modules/mod_setenvif.so +LoadModule version_module modules/mod_version.so +LoadModule mime_module modules/mod_mime.so +LoadModule status_module modules/mod_status.so +LoadModule autoindex_module modules/mod_autoindex.so +LoadModule asis_module modules/mod_asis.so +LoadModule info_module modules/mod_info.so +LoadModule cgi_module modules/mod_cgi.so +LoadModule vhost_alias_module modules/mod_vhost_alias.so +LoadModule negotiation_module modules/mod_negotiation.so +LoadModule dir_module modules/mod_dir.so +LoadModule imagemap_module modules/mod_imagemap.so +LoadModule actions_module modules/mod_actions.so +LoadModule speling_module modules/mod_speling.so +LoadModule userdir_module modules/mod_userdir.so +LoadModule alias_module modules/mod_alias.so +LoadModule rewrite_module modules/mod_rewrite.so +LoadModule php5_module modules/libphp5.so + + + +# +# If you wish httpd to run as a different user or group, you must run +# httpd as root initially and it will switch. +# +# User/Group: The name (or #number) of the user/group to run httpd as. +# It is usually good practice to create a dedicated user and group for +# running httpd, as with most system services. +# +User www +Group www + + + + +# 'Main' server configuration +# +# The directives in this section set up the values used by the 'main' +# server, which responds to any requests that aren't handled by a +# definition. These values also provide defaults for +# any containers you may define later in the file. +# +# All of these directives may appear inside containers, +# in which case these default settings will be overridden for the +# virtual host being defined. +# + +# +# ServerAdmin: Your address, where problems with the server should be +# e-mailed. This address appears on some server-generated pages, such +# as error documents. e.g. admin@your-domain.com +# +ServerAdmin you@example.com + +# +# ServerName gives the name and port that the server uses to identify itself. +# This can often be determined automatically, but we recommend you specify +# it explicitly to prevent problems during startup. +# +# If your host doesn't have a registered DNS name, enter its IP address here. +# +ServerName www.example.com:80 + +# +# DocumentRoot: The directory out of which you will serve your +# documents. By default, all requests are taken from this directory, but +# symbolic links and aliases may be used to point to other locations. +# +DocumentRoot "/alidata/www" + +# +# Each directory to which Apache has access can be configured with respect +# to which services and features are allowed and/or disabled in that +# directory (and its subdirectories). +# +# First, we configure the "default" to be a very restrictive set of +# features. +# + + Options FollowSymLinks + AllowOverride None + Order deny,allow + Deny from all + + +# +# Note that from this point forward you must specifically allow +# particular features to be enabled - so if something's not working as +# you might expect, make sure that you have specifically enabled it +# below. +# + +# +# This should be changed to whatever you set DocumentRoot to. +# + + # + # Possible values for the Options directive are "None", "All", + # or any combination of: + # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews + # + # Note that "MultiViews" must be named *explicitly* --- "Options All" + # doesn't give it to you. + # + # The Options directive is both complicated and important. Please see + # http://httpd.apache.org/docs/2.2/mod/core.html#options + # for more information. + # + Options -Indexes FollowSymLinks + + # + # AllowOverride controls what directives may be placed in .htaccess files. + # It can be "All", "None", or any combination of the keywords: + # Options FileInfo AuthConfig Limit + # + AllowOverride All + + # + # Controls who can get stuff from this server. + # + Order allow,deny + Allow from all + + + +# +# DirectoryIndex: sets the file that Apache will serve if a directory +# is requested. +# + + DirectoryIndex index.html index.htm index.php + + +# +# The following lines prevent .htaccess and .htpasswd files from being +# viewed by Web clients. +# + + Order allow,deny + Deny from all + Satisfy All + + +# +# ErrorLog: The location of the error log file. +# If you do not specify an ErrorLog directive within a +# container, error messages relating to that virtual host will be +# logged here. If you *do* define an error logfile for a +# container, that host's errors will be logged there and not here. +# +ErrorLog "logs/error_log" + +# +# LogLevel: Control the number of messages logged to the error_log. +# Possible values include: debug, info, notice, warn, error, crit, +# alert, emerg. +# +LogLevel warn + + + # + # The following directives define some format nicknames for use with + # a CustomLog directive (see below). + # + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined + LogFormat "%h %l %u %t \"%r\" %>s %b" common + + + # You need to enable mod_logio.c to use %I and %O + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio + + + # + # The location and format of the access logfile (Common Logfile Format). + # If you do not define any access logfiles within a + # container, they will be logged here. Contrariwise, if you *do* + # define per- access logfiles, transactions will be + # logged therein and *not* in this file. + # + CustomLog "logs/access_log" common + + # + # If you prefer a logfile with access, agent, and referer information + # (Combined Logfile Format) you can use the following directive. + # + #CustomLog "logs/access_log" combined + + + + # + # Redirect: Allows you to tell clients about documents that used to + # exist in your server's namespace, but do not anymore. The client + # will make a new request for the document at its new location. + # Example: + # Redirect permanent /foo http://www.example.com/bar + + # + # Alias: Maps web paths into filesystem paths and is used to + # access content that does not live under the DocumentRoot. + # Example: + # Alias /webpath /full/filesystem/path + # + # If you include a trailing / on /webpath then the server will + # require it to be present in the URL. You will also likely + # need to provide a section to allow access to + # the filesystem path. + + # + # ScriptAlias: This controls which directories contain server scripts. + # ScriptAliases are essentially the same as Aliases, except that + # documents in the target directory are treated as applications and + # run by the server when requested rather than as documents sent to the + # client. The same rules about trailing "/" apply to ScriptAlias + # directives as to Alias. + # + ScriptAlias /cgi-bin/ "/alidata/server/httpd/cgi-bin/" + + + + + # + # ScriptSock: On threaded servers, designate the path to the UNIX + # socket used to communicate with the CGI daemon of mod_cgid. + # + #Scriptsock logs/cgisock + + +# +# "/alidata/server/httpd/cgi-bin" should be changed to whatever your ScriptAliased +# CGI directory exists, if you have that configured. +# + + AllowOverride None + Options None + Order allow,deny + Allow from all + + +# +# DefaultType: the default MIME type the server will use for a document +# if it cannot otherwise determine one, such as from filename extensions. +# If your server contains mostly text or HTML documents, "text/plain" is +# a good value. If most of your content is binary, such as applications +# or images, you may want to use "application/octet-stream" instead to +# keep browsers from trying to display binary files as though they are +# text. +# +DefaultType text/plain + + + # + # TypesConfig points to the file containing the list of mappings from + # filename extension to MIME-type. + # + TypesConfig conf/mime.types + + # + # AddType allows you to add to or override the MIME configuration + # file specified in TypesConfig for specific file types. + # + #AddType application/x-gzip .tgz + # + # AddEncoding allows you to have certain browsers uncompress + # information on the fly. Note: Not all browsers support this. + # + #AddEncoding x-compress .Z + #AddEncoding x-gzip .gz .tgz + # + # If the AddEncoding directives above are commented-out, then you + # probably should define those extensions to indicate media types: + # + AddType application/x-compress .Z + AddType application/x-gzip .gz .tgz + + # + # AddHandler allows you to map certain file extensions to "handlers": + # actions unrelated to filetype. These can be either built into the server + # or added with the Action directive (see below) + # + # To use CGI scripts outside of ScriptAliased directories: + # (You will also need to add "ExecCGI" to the "Options" directive.) + # + #AddHandler cgi-script .cgi + + # For type maps (negotiated resources): + #AddHandler type-map var + + # + # Filters allow you to process content before it is sent to the client. + # + # To parse .shtml files for server-side includes (SSI): + # (You will also need to add "Includes" to the "Options" directive.) + # + #AddType text/html .shtml + #AddOutputFilter INCLUDES .shtml + + +# +# The mod_mime_magic module allows the server to use various hints from the +# contents of the file itself to determine its type. The MIMEMagicFile +# directive tells the module where the hint definitions are located. +# +#MIMEMagicFile conf/magic + +# +# Customizable error responses come in three flavors: +# 1) plain text 2) local redirects 3) external redirects +# +# Some examples: +#ErrorDocument 500 "The server made a boo boo." +#ErrorDocument 404 /missing.html +#ErrorDocument 404 "/cgi-bin/missing_handler.pl" +#ErrorDocument 402 http://www.example.com/subscription_info.html +# + +# +# EnableMMAP and EnableSendfile: On systems that support it, +# memory-mapping or the sendfile syscall is used to deliver +# files. This usually improves server performance, but must +# be turned off when serving from networked-mounted +# filesystems or if support for these functions is otherwise +# broken on your system. +# +#EnableMMAP off +#EnableSendfile off + +# Supplemental configuration +# +# The configuration files in the conf/extra/ directory can be +# included to add extra features or to modify the default configuration of +# the server, or you may simply copy their contents here and change as +# necessary. + +# Server-pool management (MPM specific) +Include conf/extra/httpd-mpm.conf + +# Multi-language error messages +#Include conf/extra/httpd-multilang-errordoc.conf + +# Fancy directory listings +#Include conf/extra/httpd-autoindex.conf + +# Language settings +#Include conf/extra/httpd-languages.conf + +# User home directories +#Include conf/extra/httpd-userdir.conf + +# Real-time info on requests and configuration +#Include conf/extra/httpd-info.conf + +# Virtual hosts +Include conf/extra/httpd-vhosts.conf + +# Local access to the Apache HTTP Server Manual +#Include conf/extra/httpd-manual.conf + +# Distributed authoring and versioning (WebDAV) +#Include conf/extra/httpd-dav.conf + +# Various default settings +#Include conf/extra/httpd-default.conf + +# Secure (SSL/TLS) connections +#Include conf/extra/httpd-ssl.conf +# +# Note: The following must must be present to support +# starting without SSL on platforms with no /dev/random equivalent +# but a statically compiled-in mod_ssl. +# + +SSLRandomSeed startup builtin +SSLRandomSeed connect builtin + +HostnameLookups off +AddType application/x-httpd-php .php \ No newline at end of file diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/vhosts/phpwind.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/vhosts/phpwind.conf new file mode 100644 index 0000000..9d0ae07 --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.2.22/vhosts/phpwind.conf @@ -0,0 +1,25 @@ + + +Order allow,deny +Deny from all + + + + + DocumentRoot /alidata/www/phpwind + ServerName localhost + ServerAlias localhost + + Options -Indexes FollowSymLinks + AllowOverride all + Order allow,deny + Allow from all + + + RewriteEngine On + RewriteRule ^(.*)-htm-(.*)$ $1.php?$2 + RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 + + ErrorLog "/alidata/log/httpd/phpwind-error.log" + CustomLog "/alidata/log/httpd/phpwind.log" common + diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.4.2/extra/httpd-vhosts.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.4.2/extra/httpd-vhosts.conf new file mode 100644 index 0000000..9fa5f6a --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.4.2/extra/httpd-vhosts.conf @@ -0,0 +1,27 @@ +# +# Virtual Hosts +# +# If you want to maintain multiple domains/hostnames on your +# machine you can setup VirtualHost containers for them. Most configurations +# use only name-based virtual hosts so the server doesn't need to worry about +# IP addresses. This is indicated by the asterisks in the directives below. +# +# Please see the documentation at +# +# for further details before you try to setup virtual hosts. +# +# You may use the command line option '-S' to verify your virtual host +# configuration. + +# +# Use name-based virtual hosting. +# +#NameVirtualHost *:80 + +# +# VirtualHost example: +# Almost any Apache directive may go into a VirtualHost container. +# The first VirtualHost section is used for all requests that do not +# match a ServerName or ServerAlias in any block. +# +Include /alidata/server/httpd/conf/vhosts/*.conf \ No newline at end of file diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.4.2/httpd.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.4.2/httpd.conf new file mode 100644 index 0000000..e74a93b --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.4.2/httpd.conf @@ -0,0 +1,505 @@ +# +# This is the main Apache HTTP server configuration file. It contains the +# configuration directives that give the server its instructions. +# See for detailed information. +# In particular, see +# +# for a discussion of each configuration directive. +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. You have been warned. +# +# Configuration and logfile names: If the filenames you specify for many +# of the server's control files begin with "/" (or "drive:/" for Win32), the +# server will use that explicit path. If the filenames do *not* begin +# with "/", the value of ServerRoot is prepended -- so "logs/access_log" +# with ServerRoot set to "/usr/local/apache2" will be interpreted by the +# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" +# will be interpreted as '/logs/access_log'. + +# +# ServerRoot: The top of the directory tree under which the server's +# configuration, error, and log files are kept. +# +# Do not add a slash at the end of the directory path. If you point +# ServerRoot at a non-local disk, be sure to specify a local disk on the +# Mutex directive, if file-based mutexes are used. If you wish to share the +# same ServerRoot for multiple httpd daemons, you will need to change at +# least PidFile. +# +ServerRoot "/alidata/server/httpd" + +# +# Mutex: Allows you to set the mutex mechanism and mutex file directory +# for individual mutexes, or change the global defaults +# +# Uncomment and change the directory if mutexes are file-based and the default +# mutex file directory is not on a local disk or is not appropriate for some +# other reason. +# +# Mutex default:logs + +# +# Listen: Allows you to bind Apache to specific IP addresses and/or +# ports, instead of the default. See also the +# directive. +# +# Change this to Listen on specific IP addresses as shown below to +# prevent Apache from glomming onto all bound IP addresses. +# +#Listen 12.34.56.78:80 +Listen 80 + +# +# Dynamic Shared Object (DSO) Support +# +# To be able to use the functionality of a module which was built as a DSO you +# have to place corresponding `LoadModule' lines at this location so the +# directives contained in it are actually available _before_ they are used. +# Statically compiled modules (those listed by `httpd -l') do not need +# to be loaded here. +# +# Example: +# LoadModule foo_module modules/mod_foo.so +# +LoadModule authn_file_module modules/mod_authn_file.so +#LoadModule authn_dbm_module modules/mod_authn_dbm.so +#LoadModule authn_anon_module modules/mod_authn_anon.so +#LoadModule authn_dbd_module modules/mod_authn_dbd.so +#LoadModule authn_socache_module modules/mod_authn_socache.so +LoadModule authn_core_module modules/mod_authn_core.so +LoadModule authz_host_module modules/mod_authz_host.so +LoadModule authz_groupfile_module modules/mod_authz_groupfile.so +LoadModule authz_user_module modules/mod_authz_user.so +#LoadModule authz_dbm_module modules/mod_authz_dbm.so +#LoadModule authz_owner_module modules/mod_authz_owner.so +#LoadModule authz_dbd_module modules/mod_authz_dbd.so +LoadModule authz_core_module modules/mod_authz_core.so +LoadModule access_compat_module modules/mod_access_compat.so +LoadModule auth_basic_module modules/mod_auth_basic.so +#LoadModule auth_form_module modules/mod_auth_form.so +#LoadModule auth_digest_module modules/mod_auth_digest.so +#LoadModule allowmethods_module modules/mod_allowmethods.so +#LoadModule file_cache_module modules/mod_file_cache.so +#LoadModule cache_module modules/mod_cache.so +#LoadModule cache_disk_module modules/mod_cache_disk.so +#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so +#LoadModule socache_dbm_module modules/mod_socache_dbm.so +#LoadModule socache_memcache_module modules/mod_socache_memcache.so +#LoadModule watchdog_module modules/mod_watchdog.so +#LoadModule dbd_module modules/mod_dbd.so +#LoadModule dumpio_module modules/mod_dumpio.so +#LoadModule echo_module modules/mod_echo.so +#LoadModule buffer_module modules/mod_buffer.so +#LoadModule data_module modules/mod_data.so +#LoadModule ratelimit_module modules/mod_ratelimit.so +LoadModule reqtimeout_module modules/mod_reqtimeout.so +#LoadModule ext_filter_module modules/mod_ext_filter.so +#LoadModule request_module modules/mod_request.so +#LoadModule include_module modules/mod_include.so +LoadModule filter_module modules/mod_filter.so +#LoadModule reflector_module modules/mod_reflector.so +#LoadModule substitute_module modules/mod_substitute.so +#LoadModule sed_module modules/mod_sed.so +#LoadModule charset_lite_module modules/mod_charset_lite.so +#LoadModule deflate_module modules/mod_deflate.so +#LoadModule xml2enc_module modules/mod_xml2enc.so +#LoadModule proxy_html_module modules/mod_proxy_html.so +LoadModule mime_module modules/mod_mime.so +LoadModule log_config_module modules/mod_log_config.so +#LoadModule log_debug_module modules/mod_log_debug.so +#LoadModule log_forensic_module modules/mod_log_forensic.so +#LoadModule logio_module modules/mod_logio.so +LoadModule env_module modules/mod_env.so +#LoadModule mime_magic_module modules/mod_mime_magic.so +#LoadModule expires_module modules/mod_expires.so +LoadModule headers_module modules/mod_headers.so +#LoadModule usertrack_module modules/mod_usertrack.so +#LoadModule unique_id_module modules/mod_unique_id.so +LoadModule setenvif_module modules/mod_setenvif.so +LoadModule version_module modules/mod_version.so +#LoadModule remoteip_module modules/mod_remoteip.so +#LoadModule proxy_module modules/mod_proxy.so +#LoadModule proxy_connect_module modules/mod_proxy_connect.so +#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so +#LoadModule proxy_http_module modules/mod_proxy_http.so +#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so +#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so +#LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so +#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so +#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so +#LoadModule proxy_express_module modules/mod_proxy_express.so +#LoadModule session_module modules/mod_session.so +#LoadModule session_cookie_module modules/mod_session_cookie.so +#LoadModule session_dbd_module modules/mod_session_dbd.so +#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so +#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so +#LoadModule ssl_module modules/mod_ssl.so +#LoadModule dialup_module modules/mod_dialup.so +#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so +#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so +#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so +#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so +LoadModule unixd_module modules/mod_unixd.so +#LoadModule heartbeat_module modules/mod_heartbeat.so +#LoadModule heartmonitor_module modules/mod_heartmonitor.so +LoadModule status_module modules/mod_status.so +LoadModule autoindex_module modules/mod_autoindex.so +#LoadModule asis_module modules/mod_asis.so +#LoadModule info_module modules/mod_info.so +#LoadModule cgi_module modules/mod_cgi.so +#LoadModule vhost_alias_module modules/mod_vhost_alias.so +#LoadModule negotiation_module modules/mod_negotiation.so +LoadModule dir_module modules/mod_dir.so +#LoadModule actions_module modules/mod_actions.so +#LoadModule speling_module modules/mod_speling.so +#LoadModule userdir_module modules/mod_userdir.so +LoadModule alias_module modules/mod_alias.so +LoadModule rewrite_module modules/mod_rewrite.so +LoadModule php5_module modules/libphp5.so + + +# +# If you wish httpd to run as a different user or group, you must run +# httpd as root initially and it will switch. +# +# User/Group: The name (or #number) of the user/group to run httpd as. +# It is usually good practice to create a dedicated user and group for +# running httpd, as with most system services. +# +User www +Group www + + + +# 'Main' server configuration +# +# The directives in this section set up the values used by the 'main' +# server, which responds to any requests that aren't handled by a +# definition. These values also provide defaults for +# any containers you may define later in the file. +# +# All of these directives may appear inside containers, +# in which case these default settings will be overridden for the +# virtual host being defined. +# + +# +# ServerAdmin: Your address, where problems with the server should be +# e-mailed. This address appears on some server-generated pages, such +# as error documents. e.g. admin@your-domain.com +# +ServerAdmin you@example.com + +# +# ServerName gives the name and port that the server uses to identify itself. +# This can often be determined automatically, but we recommend you specify +# it explicitly to prevent problems during startup. +# +# If your host doesn't have a registered DNS name, enter its IP address here. +# +ServerName www.example.com:80 + +# +# Deny access to the entirety of your server's filesystem. You must +# explicitly permit access to web content directories in other +# blocks below. +# + + AllowOverride none + Require all denied + + +# +# Note that from this point forward you must specifically allow +# particular features to be enabled - so if something's not working as +# you might expect, make sure that you have specifically enabled it +# below. +# + +# +# DocumentRoot: The directory out of which you will serve your +# documents. By default, all requests are taken from this directory, but +# symbolic links and aliases may be used to point to other locations. +# +DocumentRoot "/alidata/www" + + # + # Possible values for the Options directive are "None", "All", + # or any combination of: + # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews + # + # Note that "MultiViews" must be named *explicitly* --- "Options All" + # doesn't give it to you. + # + # The Options directive is both complicated and important. Please see + # http://httpd.apache.org/docs/2.4/mod/core.html#options + # for more information. + # + Options Indexes FollowSymLinks + + # + # AllowOverride controls what directives may be placed in .htaccess files. + # It can be "All", "None", or any combination of the keywords: + # Options FileInfo AuthConfig Limit + # + AllowOverride None + + # + # Controls who can get stuff from this server. + # + Require all granted + + +# +# DirectoryIndex: sets the file that Apache will serve if a directory +# is requested. +# + + DirectoryIndex index.html index.htm index.php + + + +# +# The following lines prevent .htaccess and .htpasswd files from being +# viewed by Web clients. +# + + Require all denied + + +# +# ErrorLog: The location of the error log file. +# If you do not specify an ErrorLog directive within a +# container, error messages relating to that virtual host will be +# logged here. If you *do* define an error logfile for a +# container, that host's errors will be logged there and not here. +# +ErrorLog "logs/error_log" + +# +# LogLevel: Control the number of messages logged to the error_log. +# Possible values include: debug, info, notice, warn, error, crit, +# alert, emerg. +# +LogLevel warn + + + # + # The following directives define some format nicknames for use with + # a CustomLog directive (see below). + # + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined + LogFormat "%h %l %u %t \"%r\" %>s %b" common + + + # You need to enable mod_logio.c to use %I and %O + LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio + + + # + # The location and format of the access logfile (Common Logfile Format). + # If you do not define any access logfiles within a + # container, they will be logged here. Contrariwise, if you *do* + # define per- access logfiles, transactions will be + # logged therein and *not* in this file. + # + CustomLog "logs/access_log" common + + # + # If you prefer a logfile with access, agent, and referer information + # (Combined Logfile Format) you can use the following directive. + # + #CustomLog "logs/access_log" combined + + + + # + # Redirect: Allows you to tell clients about documents that used to + # exist in your server's namespace, but do not anymore. The client + # will make a new request for the document at its new location. + # Example: + # Redirect permanent /foo http://www.example.com/bar + + # + # Alias: Maps web paths into filesystem paths and is used to + # access content that does not live under the DocumentRoot. + # Example: + # Alias /webpath /full/filesystem/path + # + # If you include a trailing / on /webpath then the server will + # require it to be present in the URL. You will also likely + # need to provide a section to allow access to + # the filesystem path. + + # + # ScriptAlias: This controls which directories contain server scripts. + # ScriptAliases are essentially the same as Aliases, except that + # documents in the target directory are treated as applications and + # run by the server when requested rather than as documents sent to the + # client. The same rules about trailing "/" apply to ScriptAlias + # directives as to Alias. + # + ScriptAlias /cgi-bin/ "/alidata/server/httpd/cgi-bin/" + + + + + # + # ScriptSock: On threaded servers, designate the path to the UNIX + # socket used to communicate with the CGI daemon of mod_cgid. + # + #Scriptsock logs/cgisock + + +# +# "/alidata/server/httpd/cgi-bin" should be changed to whatever your ScriptAliased +# CGI directory exists, if you have that configured. +# + + AllowOverride None + Options None + Require all granted + + + + # + # TypesConfig points to the file containing the list of mappings from + # filename extension to MIME-type. + # + TypesConfig conf/mime.types + + # + # AddType allows you to add to or override the MIME configuration + # file specified in TypesConfig for specific file types. + # + #AddType application/x-gzip .tgz + # + # AddEncoding allows you to have certain browsers uncompress + # information on the fly. Note: Not all browsers support this. + # + #AddEncoding x-compress .Z + #AddEncoding x-gzip .gz .tgz + # + # If the AddEncoding directives above are commented-out, then you + # probably should define those extensions to indicate media types: + # + AddType application/x-compress .Z + AddType application/x-gzip .gz .tgz + + # + # AddHandler allows you to map certain file extensions to "handlers": + # actions unrelated to filetype. These can be either built into the server + # or added with the Action directive (see below) + # + # To use CGI scripts outside of ScriptAliased directories: + # (You will also need to add "ExecCGI" to the "Options" directive.) + # + #AddHandler cgi-script .cgi + + # For type maps (negotiated resources): + #AddHandler type-map var + + # + # Filters allow you to process content before it is sent to the client. + # + # To parse .shtml files for server-side includes (SSI): + # (You will also need to add "Includes" to the "Options" directive.) + # + #AddType text/html .shtml + #AddOutputFilter INCLUDES .shtml + + +# +# The mod_mime_magic module allows the server to use various hints from the +# contents of the file itself to determine its type. The MIMEMagicFile +# directive tells the module where the hint definitions are located. +# +#MIMEMagicFile conf/magic + +# +# Customizable error responses come in three flavors: +# 1) plain text 2) local redirects 3) external redirects +# +# Some examples: +#ErrorDocument 500 "The server made a boo boo." +#ErrorDocument 404 /missing.html +#ErrorDocument 404 "/cgi-bin/missing_handler.pl" +#ErrorDocument 402 http://www.example.com/subscription_info.html +# + +# +# MaxRanges: Maximum number of Ranges in a request before +# returning the entire resource, or one of the special +# values 'default', 'none' or 'unlimited'. +# Default setting is to accept 200 Ranges. +#MaxRanges unlimited + +# +# EnableMMAP and EnableSendfile: On systems that support it, +# memory-mapping or the sendfile syscall may be used to deliver +# files. This usually improves server performance, but must +# be turned off when serving from networked-mounted +# filesystems or if support for these functions is otherwise +# broken on your system. +# Defaults: EnableMMAP On, EnableSendfile Off +# +#EnableMMAP off +#EnableSendfile on + +# Supplemental configuration +# +# The configuration files in the conf/extra/ directory can be +# included to add extra features or to modify the default configuration of +# the server, or you may simply copy their contents here and change as +# necessary. + +# Server-pool management (MPM specific) +#Include conf/extra/httpd-mpm.conf + +# Multi-language error messages +#Include conf/extra/httpd-multilang-errordoc.conf + +# Fancy directory listings +#Include conf/extra/httpd-autoindex.conf + +# Language settings +#Include conf/extra/httpd-languages.conf + +# User home directories +#Include conf/extra/httpd-userdir.conf + +# Real-time info on requests and configuration +#Include conf/extra/httpd-info.conf + +# Virtual hosts +Include conf/extra/httpd-vhosts.conf + +# Local access to the Apache HTTP Server Manual +#Include conf/extra/httpd-manual.conf + +# Distributed authoring and versioning (WebDAV) +#Include conf/extra/httpd-dav.conf + +# Various default settings +#Include conf/extra/httpd-default.conf + +# Configure mod_proxy_html to understand HTML4/XHTML1 + +Include conf/extra/proxy-html.conf + + +# Secure (SSL/TLS) connections +#Include conf/extra/httpd-ssl.conf +# +# Note: The following must must be present to support +# starting without SSL on platforms with no /dev/random equivalent +# but a statically compiled-in mod_ssl. +# + +SSLRandomSeed startup builtin +SSLRandomSeed connect builtin + +HostnameLookups off +AddType application/x-httpd-php .php \ No newline at end of file diff --git a/shell/lanmp/apache/config-httpd/config-httpd-2.4.2/vhosts/phpwind.conf b/shell/lanmp/apache/config-httpd/config-httpd-2.4.2/vhosts/phpwind.conf new file mode 100644 index 0000000..7e58e9c --- /dev/null +++ b/shell/lanmp/apache/config-httpd/config-httpd-2.4.2/vhosts/phpwind.conf @@ -0,0 +1,25 @@ + + +Order allow,deny +Deny from all + + + + + DocumentRoot /alidata/www/phpwind + ServerName localhost + ServerAlias localhost + + Options Indexes FollowSymLinks + AllowOverride all + Order allow,deny + Allow from all + + + RewriteEngine On + RewriteRule ^(.*)-htm-(.*)$ $1.php?$2 + RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 + + ErrorLog "/alidata/log/httpd/phpwind-error.log" + CustomLog "/alidata/log/httpd/phpwind.log" common + diff --git a/shell/lanmp/apache/install_httpd-2.2.29.sh b/shell/lanmp/apache/install_httpd-2.2.29.sh new file mode 100644 index 0000000..4dd5305 --- /dev/null +++ b/shell/lanmp/apache/install_httpd-2.2.29.sh @@ -0,0 +1,87 @@ +#!/bin/bash +rm -rf httpd-2.2.29 +if [ ! -f httpd-2.2.29.tar.gz ];then + wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/httpd/httpd-2.2.29.tar.gz +fi +tar zxvf httpd-2.2.29.tar.gz +cd httpd-2.2.29 +./configure --prefix=/alidata/server/httpd \ +--with-mpm=prefork \ +--enable-so \ +--enable-rewrite \ +--enable-mods-shared=all \ +--enable-nonportable-atomics=yes \ +--disable-dav \ +--enable-deflate \ +--enable-cache \ +--enable-disk-cache \ +--enable-mem-cache \ +--enable-file-cache +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +cp support/apachectl /etc/init.d/httpd +chmod u+x /etc/init.d/httpd +cd .. + +cp /alidata/server/httpd/conf/httpd.conf /alidata/server/httpd/conf/httpd.conf.bak + +sed -i "s#LoadModule rewrite_module modules/mod_rewrite.so#LoadModule rewrite_module modules/mod_rewrite.so\nLoadModule php5_module modules/libphp5.so#" /alidata/server/httpd/conf/httpd.conf +sed -i "s#User daemon#User www#" /alidata/server/httpd/conf/httpd.conf +sed -i "s#Group daemon#Group www#" /alidata/server/httpd/conf/httpd.conf +sed -i "s;#ServerName www.example.com:80;ServerName www.example.com:80;" /alidata/server/httpd/conf/httpd.conf +sed -i "s#/alidata/server/httpd/htdocs#/alidata/www#" /alidata/server/httpd/conf/httpd.conf +sed -i "s###" /alidata/server/httpd/conf/httpd.conf +sed -i "s#AllowOverride None#AllowOverride all#" /alidata/server/httpd/conf/httpd.conf +sed -i "s#DirectoryIndex index.html#DirectoryIndex index.html index.htm index.php#" /alidata/server/httpd/conf/httpd.conf +sed -i "s;#Include conf/extra/httpd-mpm.conf;Include conf/extra/httpd-mpm.conf;" /alidata/server/httpd/conf/httpd.conf +sed -i "s;#Include conf/extra/httpd-vhosts.conf;Include conf/extra/httpd-vhosts.conf;" /alidata/server/httpd/conf/httpd.conf + +echo "HostnameLookups off" >> /alidata/server/httpd/conf/httpd.conf +echo "AddType application/x-httpd-php .php" >> /alidata/server/httpd/conf/httpd.conf + +echo "NameVirtualHost *:80" > /alidata/server/httpd/conf/extra/httpd-vhosts.conf +echo "Include /alidata/server/httpd/conf/vhosts/*.conf" >> /alidata/server/httpd/conf/extra/httpd-vhosts.conf + + +mkdir -p /alidata/server/httpd/conf/vhosts/ +cat > /alidata/server/httpd/conf/vhosts/phpwind.conf << END + + +Order allow,deny +Deny from all + + + + + DocumentRoot /alidata/www/phpwind + ServerName localhost + ServerAlias localhost + + Options Indexes FollowSymLinks + AllowOverride all + Order allow,deny + Allow from all + + + RewriteEngine On + RewriteRule ^(.*)-htm-(.*)$ $1.php?$2 + RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 + + ErrorLog "/alidata/log/httpd/phpwind-error.log" + CustomLog "/alidata/log/httpd/phpwind.log" common + +END + +#adjust httpd-mpm.conf +sed -i 's/StartServers 5/StartServers 10/g' /alidata/server/httpd/conf/extra/httpd-mpm.conf +sed -i 's/MinSpareServers 5/MinSpareServers 10/g' /alidata/server/httpd/conf/extra/httpd-mpm.conf +sed -i 's/MaxSpareServers 10/MaxSpareServers 30/g' /alidata/server/httpd/conf/extra/httpd-mpm.conf +sed -i 's/MaxClients 150/MaxClients 255/g' /alidata/server/httpd/conf/extra/httpd-mpm.conf + +/etc/init.d/httpd start + diff --git a/shell/lanmp/apache/install_httpd-2.4.10.sh b/shell/lanmp/apache/install_httpd-2.4.10.sh new file mode 100644 index 0000000..6617399 --- /dev/null +++ b/shell/lanmp/apache/install_httpd-2.4.10.sh @@ -0,0 +1,102 @@ +#!/bin/bash +rm -rf httpd-2.4.10 apr-1.5.0 apr-util-1.5.3 +if [ ! -f httpd-2.4.10.tar.gz ];then + wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/httpd/httpd-2.4.10.tar.gz +fi +tar zxvf httpd-2.4.10.tar.gz + +if [ ! -f apr-1.5.0.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/apache/apr-1.5.0.tar.gz +fi +tar -zxvf apr-1.5.0.tar.gz +cp -rf apr-1.5.0 httpd-2.4.10/srclib/apr + +if [ ! -f apr-util-1.5.3.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/apache/apr-util-1.5.3.tar.gz +fi +tar -zxvf apr-util-1.5.3.tar.gz +cp -rf apr-util-1.5.3 httpd-2.4.10/srclib/apr-util + +cd httpd-2.4.10 +./configure --prefix=/usr/local/server/httpd \ +--with-mpm=prefork \ +--enable-so \ +--enable-rewrite \ +--enable-mods-shared=all \ +--enable-nonportable-atomics=yes \ +--disable-dav \ +--enable-deflate \ +--enable-cache \ +--enable-disk-cache \ +--enable-mem-cache \ +--enable-file-cache \ +--enable-ssl \ +--with-included-apr \ +--enable-modules=all \ +--enable-mods-shared=all +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +cp support/apachectl /etc/init.d/httpd +chmod u+x /etc/init.d/httpd +cd .. + +cp /usr/local/server/httpd/conf/httpd.conf /usr/local/server/httpd/conf/httpd.conf.bak + +sed -i "s;#LoadModule rewrite_module modules/mod_rewrite.so;LoadModule rewrite_module modules/mod_rewrite.so\nLoadModule php5_module modules/libphp5.so;" /usr/local/server/httpd/conf/httpd.conf +sed -i "s#User daemon#User www#" /usr/local/server/httpd/conf/httpd.conf +sed -i "s#Group daemon#Group www#" /usr/local/server/httpd/conf/httpd.conf +sed -i "s;#ServerName www.example.com:80;ServerName www.example.com:80;" /usr/local/server/httpd/conf/httpd.conf +sed -i "s#/usr/local/server/httpd/htdocs#/data/www#" /usr/local/server/httpd/conf/httpd.conf +sed -i "s###" /usr/local/server/httpd/conf/httpd.conf +sed -i "s#AllowOverride None#AllowOverride all#" /usr/local/server/httpd/conf/httpd.conf +sed -i "s#DirectoryIndex index.html#DirectoryIndex index.html index.htm index.php#" /usr/local/server/httpd/conf/httpd.conf +sed -i "s;#Include conf/extra/httpd-mpm.conf;Include conf/extra/httpd-mpm.conf;" /usr/local/server/httpd/conf/httpd.conf +sed -i "s;#Include conf/extra/httpd-vhosts.conf;Include conf/extra/httpd-vhosts.conf;" /usr/local/server/httpd/conf/httpd.conf + +echo "HostnameLookups off" >> /usr/local/server/httpd/conf/httpd.conf +echo "AddType application/x-httpd-php .php" >> /usr/local/server/httpd/conf/httpd.conf + +echo "Include /usr/local/server/httpd/conf/vhosts/*.conf" > /usr/local/server/httpd/conf/extra/httpd-vhosts.conf + + +mkdir -p /usr/local/server/httpd/conf/vhosts/ +cat > /usr/local/server/httpd/conf/vhosts/phpwind.conf << END + + +Order allow,deny +Deny from all + + + + + DocumentRoot /data/www/phpwind + ServerName localhost + ServerAlias localhost + + Options Indexes FollowSymLinks + AllowOverride all + Order allow,deny + Allow from all + + + RewriteEngine On + RewriteRule ^(.*)-htm-(.*)$ $1.php?$2 + RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 + + ErrorLog "/data/log/httpd/phpwind-error.log" + CustomLog "/data/log/httpd/phpwind.log" common + +END + +#adjust httpd-mpm.conf +sed -i 's/StartServers 5/StartServers 10/g' /usr/local/server/httpd/conf/extra/httpd-mpm.conf +sed -i 's/MinSpareServers 5/MinSpareServers 10/g' /usr/local/server/httpd/conf/extra/httpd-mpm.conf +sed -i 's/MaxSpareServers 10/MaxSpareServers 30/g' /usr/local/server/httpd/conf/extra/httpd-mpm.conf +sed -i 's/MaxRequestWorkers 150/MaxRequestWorkers 255/g' /usr/local/server/httpd/conf/extra/httpd-mpm.conf + +#/etc/init.d/httpd start \ No newline at end of file diff --git a/shell/lanmp/env/install_dir.sh b/shell/lanmp/env/install_dir.sh new file mode 100644 index 0000000..cddb584 --- /dev/null +++ b/shell/lanmp/env/install_dir.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +#ifcentos=$(cat /proc/version | grep centos) +ifubuntu=$(cat /proc/version | grep ubuntu) + +userdel www +groupadd www +if [ "$ifubuntu" != "" ];then +useradd -g www -M -d /alidata/www -s /usr/sbin/nologin www &> /dev/null +else +useradd -g www -M -d /alidata/www -s /sbin/nologin www &> /dev/null +fi + +#if [ "$ifcentos" != "" ];then +#useradd -g www -M -d /alidata/www -s /sbin/nologin www &> /dev/null +#elif [ "$ifubuntu" != "" ];then +#useradd -g www -M -d /alidata/www -s /usr/sbin/nologin www &> /dev/null +#fi + +mkdir -p /alidata +mkdir -p /alidata/server +mkdir -p /alidata/www +mkdir -p /alidata/www/phpwind +mkdir -p /alidata/log +mkdir -p /alidata/log/php +mkdir -p /alidata/log/mysql +mkdir -p /alidata/log/nginx +mkdir -p /alidata/log/nginx/access +chown -R www:www /alidata/log + +mkdir -p /alidata/server/${mysql_dir} +ln -s /alidata/server/${mysql_dir} /alidata/server/mysql + +mkdir -p /alidata/server/${php_dir} +ln -s /alidata/server/${php_dir} /alidata/server/php + + +mkdir -p /alidata/server/${web_dir} +if echo $web |grep "nginx" > /dev/null;then +mkdir -p /alidata/log/nginx +mkdir -p /alidata/log/nginx/access +ln -s /alidata/server/${web_dir} /alidata/server/nginx +else +mkdir -p /alidata/log/httpd +mkdir -p /alidata/log/httpd/access +ln -s /alidata/server/${web_dir} /alidata/server/httpd +fi diff --git a/shell/lanmp/env/install_disk.sh b/shell/lanmp/env/install_disk.sh new file mode 100644 index 0000000..b832fe9 --- /dev/null +++ b/shell/lanmp/env/install_disk.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +mkdir -p /alidata + +if which mkfs.ext4 > /dev/null ;then + ###### + if ls /dev/xvdb1 > /dev/null;then + if cat /etc/fstab|grep /alidata > /dev/null ;then + if cat /etc/fstab|grep /alidata|grep ext3 > /dev/null ;then + sed -i "/\/alidata/d" /etc/fstab + echo '/dev/xvdb1 /alidata ext4 defaults 0 0' >> /etc/fstab + fi + else + echo '/dev/xvdb1 /alidata ext4 defaults 0 0' >> /etc/fstab + fi + mount -a + echo "" + exit; + else + if ls /dev/xvdb ;then +fdisk /dev/xvdb << EOF +n +p +1 + + +wq +EOF + mkfs.ext4 /dev/xvdb1 + echo '/dev/xvdb1 /alidata ext4 defaults 0 0' >> /etc/fstab + fi + fi + ###### +else + ############ + if ls /dev/xvdb1 > /dev/null;then + if cat /etc/fstab|grep /alidata > /dev/null ;then + echo "" + else + echo '/dev/xvdb1 /alidata ext3 defaults 0 0' >> /etc/fstab + fi + mount -a + echo "" + exit; + else + if ls /dev/xvdb ;then +fdisk /dev/xvdb << EOF +n +p +1 + + +wq +EOF + mkfs.ext3 /dev/xvdb1 + echo '/dev/xvdb1 /alidata ext3 defaults 0 0' >> /etc/fstab + fi + fi + ############ +fi + +mount -a +echo "---------- add disk ok ----------" >> tmp.log \ No newline at end of file diff --git a/shell/lanmp/env/install_env.sh b/shell/lanmp/env/install_env.sh new file mode 100644 index 0000000..94bebda --- /dev/null +++ b/shell/lanmp/env/install_env.sh @@ -0,0 +1,165 @@ +#!/bin/sh + +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ ! -f libiconv-1.13.1.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/libiconv-1.13.1.tar.gz +fi +rm -rf libiconv-1.13.1 +tar zxvf libiconv-1.13.1.tar.gz +cd libiconv-1.13.1 +./configure --prefix=/usr/local +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +cd .. + +if [ ! -f zlib-1.2.3.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/zlib-1.2.3.tar.gz +fi +rm -rf zlib-1.2.3 +tar zxvf zlib-1.2.3.tar.gz +cd zlib-1.2.3 +./configure +if [ $CPU_NUM -gt 1 ];then + make CFLAGS=-fpic -j$CPU_NUM +else + make CFLAGS=-fpic +fi +make install +cd .. + +if [ ! -f freetype-2.1.10.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/freetype-2.1.10.tar.gz +fi +rm -rf freetype-2.1.10 +tar zxvf freetype-2.1.10.tar.gz +cd freetype-2.1.10 +./configure --prefix=/usr/local/freetype.2.1.10 +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +cd .. + +if [ ! -f libpng-1.2.50.tar.gz ];then + #wget http://soft.phpwind.me/web/libpng-1.2.8.tar.gz + wget http://oss.aliyuncs.com/aliyunecs/onekey/libpng-1.2.50.tar.gz +fi +rm -rf libpng-1.2.50 +tar zxvf libpng-1.2.50.tar.gz +cd libpng-1.2.50 +./configure --prefix=/usr/local/libpng.1.2.50 +if [ $CPU_NUM -gt 1 ];then + make CFLAGS=-fpic -j$CPU_NUM +else + make CFLAGS=-fpic +fi +make install +cd .. + +if [ ! -f libevent-1.4.14b.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/libevent-1.4.14b.tar.gz +fi +rm -rf libevent-1.4.14b +tar zxvf libevent-1.4.14b.tar.gz +cd libevent-1.4.14b +./configure +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +cd .. + +if [ ! -f libmcrypt-2.5.8.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/libmcrypt-2.5.8.tar.gz +fi +rm -rf libmcrypt-2.5.8 +tar zxvf libmcrypt-2.5.8.tar.gz +cd libmcrypt-2.5.8 +./configure --disable-posix-threads +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +/sbin/ldconfig +cd libltdl/ +./configure --enable-ltdl-install +make +make install +cd ../.. + +if [ ! -f pcre-8.12.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/pcre-8.12.tar.gz +fi +rm -rf pcre-8.12 +tar zxvf pcre-8.12.tar.gz +cd pcre-8.12 +./configure +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +cd .. + +if [ ! -f jpegsrc.v6b.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/jpegsrc.v6b.tar.gz +fi +rm -rf jpeg-6b +tar zxvf jpegsrc.v6b.tar.gz +cd jpeg-6b +if [ -e /usr/share/libtool/config.guess ];then +cp -f /usr/share/libtool/config.guess . +elif [ -e /usr/share/libtool/config/config.guess ];then +cp -f /usr/share/libtool/config/config.guess . +fi +if [ -e /usr/share/libtool/config.sub ];then +cp -f /usr/share/libtool/config.sub . +elif [ -e /usr/share/libtool/config/config.sub ];then +cp -f /usr/share/libtool/config/config.sub . +fi +./configure --prefix=/usr/local/jpeg.6 --enable-shared --enable-static +mkdir -p /usr/local/jpeg.6/include +mkdir /usr/local/jpeg.6/lib +mkdir /usr/local/jpeg.6/bin +mkdir -p /usr/local/jpeg.6/man/man1 +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install-lib +make install +cd .. + +#load /usr/local/lib .so +touch /etc/ld.so.conf.d/usrlib.conf +echo "/usr/local/lib" > /etc/ld.so.conf.d/usrlib.conf +/sbin/ldconfig + +#create account.log +cat > account.log << END +########################################################################## +# +# thank you for using aliyun virtual machine +# +########################################################################## + +FTP: +account:www +password:ftp_password + +MySQL: +account:root +password:mysql_password +END \ No newline at end of file diff --git a/shell/lanmp/env/install_set_sysctl.sh b/shell/lanmp/env/install_set_sysctl.sh new file mode 100644 index 0000000..1e5832e --- /dev/null +++ b/shell/lanmp/env/install_set_sysctl.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +\cp /etc/sysctl.conf /etc/sysctl.conf.bak + +sed -i 's/net\.ipv4\.tcp_syncookies.*/net\.ipv4\.tcp_syncookies = 1/' /etc/sysctl.conf + +if cat /etc/sysctl.conf | grep "aliyun web add" > /dev/null ;then +echo "" +else +cat >> /etc/sysctl.conf < /dev/null;then + echo "" +else + echo "* soft nofile 65535" >> /etc/security/limits.conf +fi + +if cat /etc/security/limits.conf | grep "* hard nofile 65535" > /dev/null ;then + echo "" +else + echo "* hard nofile 65535" >> /etc/security/limits.conf +fi + diff --git a/shell/lanmp/ftp/config-ftp/apt_ftp/pam.d/vsftpd b/shell/lanmp/ftp/config-ftp/apt_ftp/pam.d/vsftpd new file mode 100644 index 0000000..2469397 --- /dev/null +++ b/shell/lanmp/ftp/config-ftp/apt_ftp/pam.d/vsftpd @@ -0,0 +1,10 @@ +# Standard behaviour for ftpd(8). +auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed + +# Note: vsftpd handles anonymous logins on its own. Do not enable pam_ftp.so. + +# Standard pam includes +@include common-account +@include common-session +@include common-auth +auth required pam_shells.so diff --git a/shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.chroot_list b/shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.chroot_list new file mode 100644 index 0000000..baf12b4 --- /dev/null +++ b/shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.chroot_list @@ -0,0 +1 @@ +www \ No newline at end of file diff --git a/shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.conf b/shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.conf new file mode 100644 index 0000000..1bf2a88 --- /dev/null +++ b/shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.conf @@ -0,0 +1,145 @@ +# Example config file /etc/vsftpd.conf +# +# The default compiled in settings are fairly paranoid. This sample file +# loosens things up a bit, to make the ftp daemon more usable. +# Please see vsftpd.conf.5 for all compiled in defaults. +# +# READ THIS: This example file is NOT an exhaustive list of vsftpd options. +# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's +# capabilities. +# +# +# Run standalone? vsftpd can run either from an inetd or as a standalone +# daemon started from an initscript. +listen=YES +# +# Run standalone with IPv6? +# Like the listen parameter, except vsftpd will listen on an IPv6 socket +# instead of an IPv4 one. This parameter and the listen parameter are mutually +# exclusive. +#listen_ipv6=YES +# +# Allow anonymous FTP? (Beware - allowed by default if you comment this out). +anonymous_enable=No +# +# Uncomment this to allow local users to log in. +local_enable=YES +# +# Uncomment this to enable any form of FTP write command. +write_enable=YES +# +# Default umask for local users is 077. You may wish to change this to 022, +# if your users expect that (022 is used by most other ftpd's) +local_umask=022 +# +# Uncomment this to allow the anonymous FTP user to upload files. This only +# has an effect if the above global write enable is activated. Also, you will +# obviously need to create a directory writable by the FTP user. +#anon_upload_enable=YES +# +# Uncomment this if you want the anonymous FTP user to be able to create +# new directories. +#anon_mkdir_write_enable=YES +# +# Activate directory messages - messages given to remote users when they +# go into a certain directory. +dirmessage_enable=YES +# +# If enabled, vsftpd will display directory listings with the time +# in your local time zone. The default is to display GMT. The +# times returned by the MDTM FTP command are also affected by this +# option. +use_localtime=YES +# +# Activate logging of uploads/downloads. +xferlog_enable=YES +# +# Make sure PORT transfer connections originate from port 20 (ftp-data). +connect_from_port_20=YES +# +# If you want, you can arrange for uploaded anonymous files to be owned by +# a different user. Note! Using "root" for uploaded files is not +# recommended! +#chown_uploads=YES +#chown_username=whoever +# +# You may override where the log file goes if you like. The default is shown +# below. +#xferlog_file=/var/log/vsftpd.log +# +# If you want, you can have your log file in standard ftpd xferlog format. +# Note that the default log file location is /var/log/xferlog in this case. +#xferlog_std_format=YES +# +# You may change the default value for timing out an idle session. +#idle_session_timeout=600 +# +# You may change the default value for timing out a data connection. +#data_connection_timeout=120 +# +# It is recommended that you define on your system a unique user which the +# ftp server can use as a totally isolated and unprivileged user. +#nopriv_user=ftpsecure +# +# Enable this and the server will recognise asynchronous ABOR requests. Not +# recommended for security (the code is non-trivial). Not enabling it, +# however, may confuse older FTP clients. +#async_abor_enable=YES +# +# By default the server will pretend to allow ASCII mode but in fact ignore +# the request. Turn on the below options to have the server actually do ASCII +# mangling on files when in ASCII mode. +# Beware that on some FTP servers, ASCII support allows a denial of service +# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd +# predicted this attack and has always been safe, reporting the size of the +# raw file. +# ASCII mangling is a horrible feature of the protocol. +#ascii_upload_enable=YES +#ascii_download_enable=YES +# +# You may fully customise the login banner string: +#ftpd_banner=Welcome to blah FTP service. +# +# You may specify a file of disallowed anonymous e-mail addresses. Apparently +# useful for combatting certain DoS attacks. +#deny_email_enable=YES +# (default follows) +#banned_email_file=/etc/vsftpd.banned_emails +# +# You may restrict local users to their home directories. See the FAQ for +# the possible risks in this before using chroot_local_user or +# chroot_list_enable below. +#chroot_local_user=YES +# +# You may specify an explicit list of local users to chroot() to their home +# directory. If chroot_local_user is YES, then this list becomes a list of +# users to NOT chroot(). +#chroot_local_user=YES +chroot_list_enable=YES +# (default follows) +chroot_list_file=/etc/vsftpd.chroot_list +# +# You may activate the "-R" option to the builtin ls. This is disabled by +# default to avoid remote users being able to cause excessive I/O on large +# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume +# the presence of the "-R" option, so there is a strong case for enabling it. +#ls_recurse_enable=YES +# +# Debian customization +# +# Some of vsftpd's settings don't fit the Debian filesystem layout by +# default. These settings are more Debian-friendly. +# +# This option should be the name of a directory which is empty. Also, the +# directory should not be writable by the ftp user. This directory is used +# as a secure chroot() jail at times vsftpd does not require filesystem +# access. +secure_chroot_dir=/var/run/vsftpd/empty +# +# This string is the name of the PAM service vsftpd will use. +pam_service_name=vsftpd +# +# This option specifies the location of the RSA certificate to use for SSL +# encrypted connections. +rsa_cert_file=/etc/ssl/private/vsftpd.pem +userlist_enable=YES \ No newline at end of file diff --git a/shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.user_list b/shell/lanmp/ftp/config-ftp/apt_ftp/vsftpd.user_list new file mode 100644 index 0000000..e69de29 diff --git a/shell/lanmp/ftp/config-ftp/rpm_ftp/chroot_list b/shell/lanmp/ftp/config-ftp/rpm_ftp/chroot_list new file mode 100644 index 0000000..baf12b4 --- /dev/null +++ b/shell/lanmp/ftp/config-ftp/rpm_ftp/chroot_list @@ -0,0 +1 @@ +www \ No newline at end of file diff --git a/shell/lanmp/ftp/config-ftp/rpm_ftp/ftpusers b/shell/lanmp/ftp/config-ftp/rpm_ftp/ftpusers new file mode 100644 index 0000000..096142f --- /dev/null +++ b/shell/lanmp/ftp/config-ftp/rpm_ftp/ftpusers @@ -0,0 +1,15 @@ +# Users that are not allowed to login via ftp +root +bin +daemon +adm +lp +sync +shutdown +halt +mail +news +uucp +operator +games +nobody diff --git a/shell/lanmp/ftp/config-ftp/rpm_ftp/user_list b/shell/lanmp/ftp/config-ftp/rpm_ftp/user_list new file mode 100644 index 0000000..e69de29 diff --git a/shell/lanmp/ftp/config-ftp/rpm_ftp/vsftpd.conf b/shell/lanmp/ftp/config-ftp/rpm_ftp/vsftpd.conf new file mode 100644 index 0000000..466d794 --- /dev/null +++ b/shell/lanmp/ftp/config-ftp/rpm_ftp/vsftpd.conf @@ -0,0 +1,192 @@ +# Example config file /etc/vsftpd.conf +# +# The default compiled in settings are fairly paranoid. This sample file +# loosens things up a bit, to make the ftp daemon more usable. +# Please see vsftpd.conf.5 for all compiled in defaults. +# +# READ THIS: This example file is NOT an exhaustive list of vsftpd options. +# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's +# capabilities. +# +# If vsftpd is in standalone mode, the default listen address (of all local +# interfaces) may be overridden by this setting. Provide a numeric IP address. +#listen_address=127.0.0.1 +# +# Allow anonymous FTP? (Beware - allowed by default if you comment this out). +anonymous_enable=NO +# +# Uncomment this to allow local users to log in. +local_enable=YES +# +# Uncomment this to enable any form of FTP write command. +write_enable=YES +# +# Default umask for local users is 077. You may wish to change this to 022, +# if your users expect that (022 is used by most other ftpd's) +local_umask=022 +# +# Default umask for anonymous users is 077. You may wish to change this to 022, +# if your users expect that (022 is used by most other ftpd's) +#anon_umask=022 +# +# Uncomment this to allow the anonymous FTP user to upload files. This only +# has an effect if the above global write enable is activated. Also, you will +# obviously need to create a directory writable by the FTP user. +#anon_upload_enable=YES +# +# Uncomment this if you want the anonymous FTP user to be able to create +# new directories. +#anon_mkdir_write_enable=YES +# +# Activate directory messages - messages given to remote users when they +# go into a certain directory. +dirmessage_enable=YES +# +# Activate logging of uploads/downloads. +xferlog_enable=YES +# +# Make sure PORT transfer connections originate from port 20 (ftp-data). +connect_from_port_20=YES +# +# If you want, you can arrange for uploaded anonymous files to be owned by +# a different user. Note! Using "root" for uploaded files is not +# recommended! +#chown_uploads=YES +#chown_username=whoever +# +# You may override where the log file goes if you like. The default is shown +# below. +#xferlog_file=/var/log/vsftpd.log +# +# If you want, you can have your log file in standard ftpd xferlog format. +# Note that the default log file location is /var/log/xferlog in this case. +#xferlog_std_format=YES +# +# You may change the default value for timing out an idle session. +#idle_session_timeout=600 +# +# You may change the default value for timing out a data connection. +#data_connection_timeout=120 +# +# It is recommended that you define on your system a unique user which the +# ftp server can use as a totally isolated and unprivileged user. +#nopriv_user=ftpsecure +# +# Enable this and the server will recognise asynchronous ABOR requests. Not +# recommended for security (the code is non-trivial). Not enabling it, +# however, may confuse older FTP clients. +#async_abor_enable=YES +# +# By default the server will pretend to allow ASCII mode but in fact ignore +# the request. Turn on the below options to have the server actually do ASCII +# mangling on files when in ASCII mode. +# Beware that on some FTP servers, ASCII support allows a denial of service +# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd +# predicted this attack and has always been safe, reporting the size of the +# raw file. +# ASCII mangling is a horrible feature of the protocol. +#ascii_upload_enable=YES +#ascii_download_enable=YES +# +# You may fully customise the login banner string: +#ftpd_banner=Welcome to blah FTP service. +# +# You may specify a file of disallowed anonymous e-mail addresses. Apparently +# useful for combatting certain DoS attacks. +#deny_email_enable=YES +# (default follows) +#banned_email_file=/etc/vsftpd/banned_emails +# +# You may specify an explicit list of local users to chroot() to their home +# directory. If chroot_local_user is YES, then this list becomes a list of +# users to NOT chroot(). +#chroot_local_user=YES +chroot_list_enable=YES +# (default follows) +chroot_list_file=/etc/vsftpd/chroot_list +# +# You may activate the "-R" option to the builtin ls. This is disabled by +# default to avoid remote users being able to cause excessive I/O on large +# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume +# the presence of the "-R" option, so there is a strong case for enabling it. +#ls_recurse_enable=YES +# +# When "listen" directive is enabled, vsftpd runs in standalone mode and +# listens on IPv4 sockets. This directive cannot be used in conjunction +# with the listen_ipv6 directive. +listen=YES +# +# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6 +# sockets, you must run two copies of vsftpd with two configuration files. +# Make sure, that one of the listen options is commented !! +#listen_ipv6=YES +# +pam_service_name=vsftpd +userlist_enable=YES +tcp_wrappers=YES + +# When enabled, directory listings reveal the local time for the computer +# instead of GMT. +# +#use_localtime=YES +# +# If set to YES, anonymous users will be permitted to perform write operations +# other than upload and create directory, such as deletion and renaming. +# This is generally not recommended but included for completeness. +# +#anon_other_write_enable=YES +# +# When enabled, anonymous users will only be allowed to download files which +# are world readable. This is recognising that the ftp user may own files, +# especially in the presence of uploads. +# +#anon_world_readable_only=NO +# +# Specifies the lowest possible port sent to the FTP clients for passive mode +# connections. This setting is used to limit the port range so that firewall +# rules are easier to create. +# +#pasv_min_port=30000 +# +# Specifies the highest possible port sent to the FTP clients for passive mode +# connections. This setting is used to limit the port range so that firewall +# rules are easier to create. +# +#pasv_max_port=30999 +# +# This directive specifies the maximum number of simultaneous clients allowed +# to connect to the server when it is running in standalone mode, +# in bytes per second. +# +max_clients=100 +# +# This directive enables maximum of clients allowed to connected from the +# same source IP address. +# +max_per_ip=4 +# +# Specifies the maximum data transfer rate for anonymous users in bytes +# per second. +# +#anon_max_rate=0 +# +# Specifies the maximum rate data is transfered for local users logged +# into the server in bytes per second. +# +#local_max_rate=0 +# +# Enable convert charset +# +#convert_charset_enable=1 +# +# Specifies local charset +# +#local_charset=UTF8 +# +# Specifies remote charset +# +#remote_charset=CP1251 +# +# Enable this options if you have double "褟" +# +#double_377=0 diff --git a/shell/lanmp/ftp/config-ftp/vsftpdcentosi686.conf b/shell/lanmp/ftp/config-ftp/vsftpdcentosi686.conf new file mode 100644 index 0000000..466d794 --- /dev/null +++ b/shell/lanmp/ftp/config-ftp/vsftpdcentosi686.conf @@ -0,0 +1,192 @@ +# Example config file /etc/vsftpd.conf +# +# The default compiled in settings are fairly paranoid. This sample file +# loosens things up a bit, to make the ftp daemon more usable. +# Please see vsftpd.conf.5 for all compiled in defaults. +# +# READ THIS: This example file is NOT an exhaustive list of vsftpd options. +# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's +# capabilities. +# +# If vsftpd is in standalone mode, the default listen address (of all local +# interfaces) may be overridden by this setting. Provide a numeric IP address. +#listen_address=127.0.0.1 +# +# Allow anonymous FTP? (Beware - allowed by default if you comment this out). +anonymous_enable=NO +# +# Uncomment this to allow local users to log in. +local_enable=YES +# +# Uncomment this to enable any form of FTP write command. +write_enable=YES +# +# Default umask for local users is 077. You may wish to change this to 022, +# if your users expect that (022 is used by most other ftpd's) +local_umask=022 +# +# Default umask for anonymous users is 077. You may wish to change this to 022, +# if your users expect that (022 is used by most other ftpd's) +#anon_umask=022 +# +# Uncomment this to allow the anonymous FTP user to upload files. This only +# has an effect if the above global write enable is activated. Also, you will +# obviously need to create a directory writable by the FTP user. +#anon_upload_enable=YES +# +# Uncomment this if you want the anonymous FTP user to be able to create +# new directories. +#anon_mkdir_write_enable=YES +# +# Activate directory messages - messages given to remote users when they +# go into a certain directory. +dirmessage_enable=YES +# +# Activate logging of uploads/downloads. +xferlog_enable=YES +# +# Make sure PORT transfer connections originate from port 20 (ftp-data). +connect_from_port_20=YES +# +# If you want, you can arrange for uploaded anonymous files to be owned by +# a different user. Note! Using "root" for uploaded files is not +# recommended! +#chown_uploads=YES +#chown_username=whoever +# +# You may override where the log file goes if you like. The default is shown +# below. +#xferlog_file=/var/log/vsftpd.log +# +# If you want, you can have your log file in standard ftpd xferlog format. +# Note that the default log file location is /var/log/xferlog in this case. +#xferlog_std_format=YES +# +# You may change the default value for timing out an idle session. +#idle_session_timeout=600 +# +# You may change the default value for timing out a data connection. +#data_connection_timeout=120 +# +# It is recommended that you define on your system a unique user which the +# ftp server can use as a totally isolated and unprivileged user. +#nopriv_user=ftpsecure +# +# Enable this and the server will recognise asynchronous ABOR requests. Not +# recommended for security (the code is non-trivial). Not enabling it, +# however, may confuse older FTP clients. +#async_abor_enable=YES +# +# By default the server will pretend to allow ASCII mode but in fact ignore +# the request. Turn on the below options to have the server actually do ASCII +# mangling on files when in ASCII mode. +# Beware that on some FTP servers, ASCII support allows a denial of service +# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd +# predicted this attack and has always been safe, reporting the size of the +# raw file. +# ASCII mangling is a horrible feature of the protocol. +#ascii_upload_enable=YES +#ascii_download_enable=YES +# +# You may fully customise the login banner string: +#ftpd_banner=Welcome to blah FTP service. +# +# You may specify a file of disallowed anonymous e-mail addresses. Apparently +# useful for combatting certain DoS attacks. +#deny_email_enable=YES +# (default follows) +#banned_email_file=/etc/vsftpd/banned_emails +# +# You may specify an explicit list of local users to chroot() to their home +# directory. If chroot_local_user is YES, then this list becomes a list of +# users to NOT chroot(). +#chroot_local_user=YES +chroot_list_enable=YES +# (default follows) +chroot_list_file=/etc/vsftpd/chroot_list +# +# You may activate the "-R" option to the builtin ls. This is disabled by +# default to avoid remote users being able to cause excessive I/O on large +# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume +# the presence of the "-R" option, so there is a strong case for enabling it. +#ls_recurse_enable=YES +# +# When "listen" directive is enabled, vsftpd runs in standalone mode and +# listens on IPv4 sockets. This directive cannot be used in conjunction +# with the listen_ipv6 directive. +listen=YES +# +# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6 +# sockets, you must run two copies of vsftpd with two configuration files. +# Make sure, that one of the listen options is commented !! +#listen_ipv6=YES +# +pam_service_name=vsftpd +userlist_enable=YES +tcp_wrappers=YES + +# When enabled, directory listings reveal the local time for the computer +# instead of GMT. +# +#use_localtime=YES +# +# If set to YES, anonymous users will be permitted to perform write operations +# other than upload and create directory, such as deletion and renaming. +# This is generally not recommended but included for completeness. +# +#anon_other_write_enable=YES +# +# When enabled, anonymous users will only be allowed to download files which +# are world readable. This is recognising that the ftp user may own files, +# especially in the presence of uploads. +# +#anon_world_readable_only=NO +# +# Specifies the lowest possible port sent to the FTP clients for passive mode +# connections. This setting is used to limit the port range so that firewall +# rules are easier to create. +# +#pasv_min_port=30000 +# +# Specifies the highest possible port sent to the FTP clients for passive mode +# connections. This setting is used to limit the port range so that firewall +# rules are easier to create. +# +#pasv_max_port=30999 +# +# This directive specifies the maximum number of simultaneous clients allowed +# to connect to the server when it is running in standalone mode, +# in bytes per second. +# +max_clients=100 +# +# This directive enables maximum of clients allowed to connected from the +# same source IP address. +# +max_per_ip=4 +# +# Specifies the maximum data transfer rate for anonymous users in bytes +# per second. +# +#anon_max_rate=0 +# +# Specifies the maximum rate data is transfered for local users logged +# into the server in bytes per second. +# +#local_max_rate=0 +# +# Enable convert charset +# +#convert_charset_enable=1 +# +# Specifies local charset +# +#local_charset=UTF8 +# +# Specifies remote charset +# +#remote_charset=CP1251 +# +# Enable this options if you have double "褟" +# +#double_377=0 diff --git a/shell/lanmp/ftp/install_vsftpd-2.3.2.sh b/shell/lanmp/ftp/install_vsftpd-2.3.2.sh new file mode 100644 index 0000000..b648fc0 --- /dev/null +++ b/shell/lanmp/ftp/install_vsftpd-2.3.2.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +if [ `uname -m` == "x86_64" ];then +machine=x86_64 +else +machine=i686 +fi +ifrpm=$(cat /proc/version | grep -E "redhat|centos") +ifdpkg=$(cat /proc/version | grep -Ei "ubuntu|debian") +ifcentos=$(cat /proc/version | grep centos) +ifubuntu=$(cat /proc/version | grep ubuntu) + +if [ "$ifrpm" != "" ];then + yum -y install vsftpd + \cp -f ./ftp/config-ftp/rpm_ftp/* /etc/vsftpd/ +else + apt-get -y install vsftpd + if cat /etc/shells | grep /sbin/nologin ;then + echo "" + else + echo /sbin/nologin >> /etc/shells + fi + \cp -fR ./ftp/config-ftp/apt_ftp/* /etc/ +fi + +if [ "$ifcentos" != "" ] && [ "$machine" == "i686" ];then + rm -rf /etc/vsftpd/vsftpd.conf + \cp -f ./ftp/config-ftp/vsftpdcentosi686.conf /etc/vsftpd/vsftpd.conf +fi + +if [ "$ifubuntu" != "" ];then + mv /etc/pam.d/vsftpd /etc/pam.d/vsftpd.bak + ln -s /lib/init/upstart-job /etc/init.d/vsftpd +fi + +/etc/init.d/vsftpd start + +chown -R www:www /alidata/www + +#bug kill: '500 OOPS: vsftpd: refusing to run with writable root inside chroot()' +chmod a-w /alidata/www + +MATRIX="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" +LENGTH="9" +while [ "${n:=1}" -le "$LENGTH" ] +do + PASS="$PASS${MATRIX:$(($RANDOM%${#MATRIX})):1}" + let n+=1 +done +if [ "$ifrpm" != "" ];then +echo $PASS | passwd --stdin www +else +echo "www:$PASS" | chpasswd +fi + +sed -i s/'ftp_password'/${PASS}/g account.log \ No newline at end of file diff --git a/shell/lanmp/install.sh b/shell/lanmp/install.sh new file mode 100644 index 0000000..729590b --- /dev/null +++ b/shell/lanmp/install.sh @@ -0,0 +1,279 @@ +#!/bin/bash + +####---- global variables ----begin#### +export nginx_version=1.4.4 +export httpd_version=2.2.29 +export mysql_version=5.1.73 +export php_version=5.3.29 + +export phpwind_version=8.7 +export phpmyadmin_version=4.1.8 +export vsftpd_version=2.3.2 +export sphinx_version=0.9.9 +export install_ftp_version=0.0.0 +####---- global variables ----end#### + + +web=nginx +install_log=/alidata/website-info.log + + +####---- version selection ----begin#### +tmp=1 +read -p "Please select the web of nginx/apache, input 1 or 2 : " tmp +if [ "$tmp" == "1" ];then + web=nginx +elif [ "$tmp" == "2" ];then + web=apache +fi + +tmp=1 +if echo $web |grep "nginx" > /dev/null;then + read -p "Please select the nginx version of 1.4.4, input 1: " tmp + if [ "$tmp" == "1" ];then + nginx_version=1.4.4 + fi +else + read -p "Please select the apache version of 2.2.29/2.4.10, input 1 or 2 : " tmp + if [ "$tmp" == "1" ];then + httpd_version=2.2.29 + elif [ "$tmp" == "2" ];then + httpd_version=2.4.10 + fi +fi + +tmp=1 +read -p "Please select the php version of 5.3.29/5.4.23/5.5.7, input 1 or 2 or 3 : " tmp +if [ "$tmp" == "1" ];then + php_version=5.3.29 +elif [ "$tmp" == "2" ];then + php_version=5.4.23 +elif [ "$tmp" == "3" ];then + php_version=5.5.7 +fi + +tmp=1 +read -p "Please select the mysql version of 5.1.73/5.5.40/5.6.21, input 1 or 2 or 3 : " tmp +if [ "$tmp" == "1" ];then + mysql_version=5.1.73 +elif [ "$tmp" == "2" ];then + mysql_version=5.5.40 +elif [ "$tmp" == "3" ];then + mysql_version=5.6.21 +fi + +echo "" +echo "You select the version :" +echo "web : $web" +if echo $web |grep "nginx" > /dev/null;then + echo "nginx : $nginx_version" +else + echo "apache : $httpd_version" +fi +echo "php : $php_version" +echo "mysql : $mysql_version" + +read -p "Enter the y or Y to continue:" isY +if [ "${isY}" != "y" ] && [ "${isY}" != "Y" ];then + exit 1 +fi +####---- version selection ----end#### + + +####---- Clean up the environment ----begin#### +echo "will be installed, wait ..." +./uninstall.sh in &> /dev/null +####---- Clean up the environment ----end#### + + +if echo $web|grep "nginx" > /dev/null;then +web_dir=nginx-${nginx_version} +else +web_dir=httpd-${httpd_version} +fi + +php_dir=php-${php_version} + +if [ `uname -m` == "x86_64" ];then +machine=x86_64 +else +machine=i686 +fi + + +####---- global variables ----begin#### +export web +export web_dir +export php_dir +export mysql_dir=mysql-${mysql_version} +export vsftpd_dir=vsftpd-${vsftpd_version} +export sphinx_dir=sphinx-${sphinx_version} +####---- global variables ----end#### + + +ifredhat=$(cat /proc/version | grep redhat) +ifcentos=$(cat /proc/version | grep centos) +ifubuntu=$(cat /proc/version | grep ubuntu) +ifdebian=$(cat /proc/version | grep -i debian) + + +####---- install dependencies ----begin#### +if [ "$ifcentos" != "" ] || [ "$machine" == "i686" ];then +rpm -e httpd-2.2.3-31.el5.centos gnome-user-share &> /dev/null +fi + +\cp /etc/rc.local /etc/rc.local.bak +if [ "$ifredhat" != "" ];then +rpm -e --allmatches mysql MySQL-python perl-DBD-MySQL dovecot exim qt-MySQL perl-DBD-MySQL dovecot qt-MySQL mysql-server mysql-connector-odbc php-mysql mysql-bench libdbi-dbd-mysql mysql-devel-5.0.77-3.el5 httpd php mod_auth_mysql mailman squirrelmail php-pdo php-common php-mbstring php-cli &> /dev/null +fi + +if [ "$ifredhat" != "" ];then + \mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.bak &> /dev/null + \cp ./res/rhel-debuginfo.repo /etc/yum.repos.d/ + yum makecache + yum -y remove mysql MySQL-python perl-DBD-MySQL dovecot exim qt-MySQL perl-DBD-MySQL dovecot qt-MySQL mysql-server mysql-connector-odbc php-mysql mysql-bench libdbi-dbd-mysql mysql-devel-5.0.77-3.el5 httpd php mod_auth_mysql mailman squirrelmail php-pdo php-common php-mbstring php-cli &> /dev/null + yum -y install gcc gcc-c++ gcc-g77 make libtool autoconf patch unzip automake fiex* libxml2 libxml2-devel ncurses ncurses-devel libtool-ltdl-devel libtool-ltdl libmcrypt libmcrypt-devel libpng libpng-devel libjpeg-devel openssl openssl-devel curl curl-devel libxml2 libxml2-devel ncurses ncurses-devel libtool-ltdl-devel libtool-ltdl autoconf automake libaio* + iptables -F +elif [ "$ifcentos" != "" ];then + if grep 5.10 /etc/issus ;then + rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5 + fi + sed -i 's/^exclude/#exclude/' /etc/yum.conf + yum makecache + yum -y remove mysql MySQL-python perl-DBD-MySQL dovecot exim qt-MySQL perl-DBD-MySQL dovecot qt-MySQL mysql-server mysql-connector-odbc php-mysql mysql-bench libdbi-dbd-mysql mysql-devel-5.0.77-3.el5 httpd php mod_auth_mysql mailman squirrelmail php-pdo php-common php-mbstring php-cli &> /dev/null + yum -y install gcc gcc-c++ gcc-g77 make libtool autoconf patch unzip automake libxml2 libxml2-devel ncurses ncurses-devel libtool-ltdl-devel libtool-ltdl libmcrypt libmcrypt-devel libpng libpng-devel libjpeg-devel openssl openssl-devel curl curl-devel libxml2 libxml2-devel ncurses ncurses-devel libtool-ltdl-devel libtool-ltdl autoconf automake libaio* + iptables -F +elif [ "$ifubuntu" != "" ];then + apt-get -y update + \mv /etc/apache2 /etc/apache2.bak &> /dev/null + \mv /etc/nginx /etc/nginx.bak &> /dev/null + \mv /etc/php5 /etc/php5.bak &> /dev/null + \mv /etc/mysql /etc/mysql.bak &> /dev/null + apt-get -y autoremove apache2 nginx php5 mysql-server &> /dev/null + apt-get -y install unzip build-essential libncurses5-dev libfreetype6-dev libxml2-dev libssl-dev libcurl4-openssl-dev libjpeg62-dev libpng12-dev libfreetype6-dev libsasl2-dev libpcre3-dev autoconf libperl-dev libtool libaio* + iptables -F +elif [ "$ifdebian" != "" ];then + apt-get -y update + \mv /etc/apache2 /etc/apache2.bak &> /dev/null + \mv /etc/nginx /etc/nginx.bak &> /dev/null + \mv /etc/php5 /etc/php5.bak &> /dev/null + \mv /etc/mysql /etc/mysql.bak &> /dev/null + apt-get -y autoremove apache2 nginx php5 mysql-server &> /dev/null + apt-get -y install unzip psmisc build-essential libncurses5-dev libfreetype6-dev libxml2-dev libssl-dev libcurl4-openssl-dev libjpeg62-dev libpng12-dev libfreetype6-dev libsasl2-dev libpcre3-dev autoconf libperl-dev libtool libaio* + iptables -F +fi +####---- install dependencies ----end#### + + +####---- install software ----begin#### +rm -f tmp.log +echo tmp.log + +./env/install_set_sysctl.sh +./env/install_set_ulimit.sh + +if [ -e /dev/xvdb ];then + ./env/install_disk.sh +fi + +./env/install_dir.sh +echo "---------- make dir ok ----------" >> tmp.log + +./env/install_env.sh +echo "---------- env ok ----------" >> tmp.log + +./mysql/install_${mysql_dir}.sh +echo "---------- ${mysql_dir} ok ----------" >> tmp.log + +if echo $web |grep "nginx" > /dev/null;then + ./nginx/install_nginx-${nginx_version}.sh + echo "---------- ${web_dir} ok ----------" >> tmp.log + ./php/install_nginx_php-${php_version}.sh + echo "---------- ${php_dir} ok ----------" >> tmp.log +else + ./apache/install_httpd-${httpd_version}.sh + echo "---------- ${web_dir} ok ----------" >> tmp.log + ./php/install_httpd_php-${php_version}.sh + echo "---------- ${php_dir} ok ----------" >> tmp.log +fi + +./php/install_php_extension.sh +echo "---------- php extension ok ----------" >> tmp.log + +./ftp/install_${vsftpd_dir}.sh +install_ftp_version=$(vsftpd -v 0> vsftpd_version && cat vsftpd_version |awk -F: '{print $2}'|awk '{print $2}' && rm -f vsftpd_version) +echo "---------- vsftpd-$install_ftp_version ok ----------" >> tmp.log + +./res/install_soft.sh +echo "---------- phpwind-$phpwind_version ok ----------" >> tmp.log +echo "---------- phpmyadmin-$phpmyadmin_version ok ----------" >> tmp.log +echo "---------- web init ok ----------" >> tmp.log +####---- install software ----end#### + + +####---- Start command is written to the rc.local ----begin#### +if ! cat /etc/rc.local | grep "/etc/init.d/mysqld" > /dev/null;then + echo "/etc/init.d/mysqld start" >> /etc/rc.local +fi +if echo $web|grep "nginx" > /dev/null;then + if ! cat /etc/rc.local | grep "/etc/init.d/nginx" > /dev/null;then + echo "/etc/init.d/nginx start" >> /etc/rc.local + echo "/etc/init.d/php-fpm start" >> /etc/rc.local + fi +else + if ! cat /etc/rc.local | grep "/etc/init.d/httpd" > /dev/null;then + echo "/etc/init.d/httpd start" >> /etc/rc.local + fi +fi +if ! cat /etc/rc.local | grep "/etc/init.d/vsftpd" > /dev/null;then + echo "/etc/init.d/vsftpd start" >> /etc/rc.local +fi +####---- Start command is written to the rc.local ----end#### + + +####---- centos yum configuration----begin#### +if [ "$ifcentos" != "" ] && [ "$machine" == "x86_64" ];then +sed -i 's/^#exclude/exclude/' /etc/yum.conf +fi +if [ "$ifubuntu" != "" ] || [ "$ifdebian" != "" ];then + mkdir -p /var/lock + sed -i 's#exit 0#touch /var/lock/local#' /etc/rc.local +else + mkdir -p /var/lock/subsys/ +fi +####---- centos yum configuration ----end#### + +####---- mysql password initialization ----begin#### +echo "---------- rc init ok ----------" >> tmp.log +/alidata/server/php/bin/php -f ./res/init_mysql.php +echo "---------- mysql init ok ----------" >> tmp.log +####---- mysql password initialization ----end#### + + +####---- Environment variable settings ----begin#### +\cp /etc/profile /etc/profile.bak +if echo $web|grep "nginx" > /dev/null;then + echo 'export PATH=$PATH:/alidata/server/mysql/bin:/alidata/server/nginx/sbin:/alidata/server/php/sbin:/alidata/server/php/bin' >> /etc/profile + export PATH=$PATH:/alidata/server/mysql/bin:/alidata/server/nginx/sbin:/alidata/server/php/sbin:/alidata/server/php/bin +else + echo 'export PATH=$PATH:/alidata/server/mysql/bin:/alidata/server/httpd/bin:/alidata/server/php/sbin:/alidata/server/php/bin' >> /etc/profile + export PATH=$PATH:/alidata/server/mysql/bin:/alidata/server/httpd/bin:/alidata/server/php/sbin:/alidata/server/php/bin +fi +####---- Environment variable settings ----end#### + + +####---- restart ----begin#### +if echo $web|grep "nginx" > /dev/null;then +/etc/init.d/php-fpm restart > /dev/null +/etc/init.d/nginx restart > /dev/null +else +/etc/init.d/httpd restart > /dev/null +/etc/init.d/httpd start &> /dev/null +fi +/etc/init.d/vsftpd restart +####---- restart ----end#### + +####---- log ----begin#### +\cp tmp.log $install_log +cat $install_log +####---- log ----end#### \ No newline at end of file diff --git a/shell/lanmp/mysql/install_mysql-5.1.73.sh b/shell/lanmp/mysql/install_mysql-5.1.73.sh new file mode 100644 index 0000000..9379c48 --- /dev/null +++ b/shell/lanmp/mysql/install_mysql-5.1.73.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +ifubuntu=$(cat /proc/version | grep ubuntu) +if14=$(cat /etc/issue | grep 14) + +if [ `uname -m` == "x86_64" ];then +machine=x86_64 +else +machine=i686 +fi +if [ $machine == "x86_64" ];then + rm -rf mysql-5.1.73-linux-x86_64-glibc23 + if [ ! -f mysql-5.1.73-linux-x86_64-glibc23.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/mysql/mysql-5.1.73-linux-x86_64-glibc23.tar.gz + fi + tar -xzvf mysql-5.1.73-linux-x86_64-glibc23.tar.gz + mv mysql-5.1.73-linux-x86_64-glibc23/* /alidata/server/mysql +else + rm -rf mysql-5.1.73-linux-i686-glibc23 + if [ ! -f mysql-5.1.73-linux-i686-glibc23.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/mysql/mysql-5.1.73-linux-i686-glibc23.tar.gz + fi + tar -xzvf mysql-5.1.73-linux-i686-glibc23.tar.gz + mv mysql-5.1.73-linux-i686-glibc23/* /alidata/server/mysql +fi + +if [ "$ifubuntu" != "" ] && [ "$if14" != "" ];then + mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak +fi + +groupadd mysql +useradd -g mysql -s /sbin/nologin mysql +/alidata/server/mysql/scripts/mysql_install_db --datadir=/alidata/server/mysql/data/ --basedir=/alidata/server/mysql --user=mysql +chown -R mysql:mysql /alidata/server/mysql/ +chown -R mysql:mysql /alidata/server/mysql/data/ +chown -R mysql:mysql /alidata/log/mysql +\cp -f /alidata/server/mysql/support-files/mysql.server /etc/init.d/mysqld +sed -i 's#^basedir=$#basedir=/alidata/server/mysql#' /etc/init.d/mysqld +sed -i 's#^datadir=$#datadir=/alidata/server/mysql/data#' /etc/init.d/mysqld +\cp -f /alidata/server/mysql/support-files/my-medium.cnf /etc/my.cnf +sed -i 's#skip-locking#skip-external-locking\nlog-error=/alidata/log/mysql/error.log#' /etc/my.cnf +chmod 755 /etc/init.d/mysqld +/etc/init.d/mysqld start \ No newline at end of file diff --git a/shell/lanmp/mysql/install_mysql-5.5.40.sh b/shell/lanmp/mysql/install_mysql-5.5.40.sh new file mode 100644 index 0000000..405220e --- /dev/null +++ b/shell/lanmp/mysql/install_mysql-5.5.40.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +ifubuntu=$(cat /proc/version | grep ubuntu) +if14=$(cat /etc/issue | grep 14) + +if [ `uname -m` == "x86_64" ];then +machine=x86_64 +else +machine=i686 +fi +if [ $machine == "x86_64" ];then + rm -rf mysql-5.5.40-linux2.6-x86_64 + if [ ! -f mysql-5.5.40-linux2.6-x86_64.tar.gz ];then + wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/mysql/mysql-5.5.40-linux2.6-x86_64.tar.gz + fi + tar -xzvf mysql-5.5.40-linux2.6-x86_64.tar.gz + mv mysql-5.5.40-linux2.6-x86_64/* /alidata/server/mysql +else + rm -rf mysql-5.5.40-linux2.6-i686 + if [ ! -f mysql-5.5.40-linux2.6-i686.tar.gz ];then + wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/mysql/mysql-5.5.40-linux2.6-i686.tar.gz + fi + tar -xzvf mysql-5.5.40-linux2.6-i686.tar.gz + mv mysql-5.5.40-linux2.6-i686/* /alidata/server/mysql +fi + +if [ "$ifubuntu" != "" ] && [ "$if14" != "" ];then + mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak +fi + +groupadd mysql +useradd -g mysql -s /sbin/nologin mysql +/alidata/server/mysql/scripts/mysql_install_db --datadir=/alidata/server/mysql/data/ --basedir=/alidata/server/mysql --user=mysql +chown -R mysql:mysql /alidata/server/mysql/ +chown -R mysql:mysql /alidata/server/mysql/data/ +chown -R mysql:mysql /alidata/log/mysql +\cp -f /alidata/server/mysql/support-files/mysql.server /etc/init.d/mysqld +sed -i 's#^basedir=$#basedir=/alidata/server/mysql#' /etc/init.d/mysqld +sed -i 's#^datadir=$#datadir=/alidata/server/mysql/data#' /etc/init.d/mysqld +\cp -f /alidata/server/mysql/support-files/my-medium.cnf /etc/my.cnf +sed -i 's#skip-external-locking#skip-external-locking\nlog-error=/alidata/log/mysql/error.log#' /etc/my.cnf +chmod 755 /etc/init.d/mysqld +/etc/init.d/mysqld start diff --git a/shell/lanmp/mysql/install_mysql-5.6.21.sh b/shell/lanmp/mysql/install_mysql-5.6.21.sh new file mode 100644 index 0000000..76e78d7 --- /dev/null +++ b/shell/lanmp/mysql/install_mysql-5.6.21.sh @@ -0,0 +1,82 @@ +#!/bin/bash + +ifubuntu=$(cat /proc/version | grep ubuntu) +if14=$(cat /etc/issue | grep 14) + +if [ `uname -m` == "x86_64" ];then +machine=x86_64 +else +machine=i686 +fi +if [ $machine == "x86_64" ];then + rm -rf mysql-5.6.21-linux-glibc2.5-x86_64 + if [ ! -f mysql-5.6.21-linux-glibc2.5-x86_64.tar.gz ];then + wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/mysql/mysql-5.6.21-linux-glibc2.5-x86_64.tar.gz + fi + tar -xzvf mysql-5.6.21-linux-glibc2.5-x86_64.tar.gz + mv mysql-5.6.21-linux-glibc2.5-x86_64/* /alidata/server/mysql +else + rm -rf mysql-5.6.21-linux-glibc2.5-i686 + if [ ! -f mysql-5.6.21-linux-glibc2.5-i686.tar.gz ];then + wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/mysql/mysql-5.6.21-linux-glibc2.5-i686.tar.gz + fi + tar -xzvf mysql-5.6.21-linux-glibc2.5-i686.tar.gz + mv mysql-5.6.21-linux-glibc2.5-i686/* /alidata/server/mysql +fi + +if [ "$ifubuntu" != "" ] && [ "$if14" != "" ];then + mv /etc/mysql/my.cnf /etc/mysql/my.cnf.bak +fi + +groupadd mysql +useradd -g mysql -s /sbin/nologin mysql +/alidata/server/mysql/scripts/mysql_install_db --datadir=/alidata/server/mysql/data/ --basedir=/alidata/server/mysql --user=mysql +chown -R mysql:mysql /alidata/server/mysql/ +chown -R mysql:mysql /alidata/server/mysql/data/ +chown -R mysql:mysql /alidata/log/mysql +\cp -f /alidata/server/mysql/support-files/mysql.server /etc/init.d/mysqld +sed -i 's#^basedir=$#basedir=/alidata/server/mysql#' /etc/init.d/mysqld +sed -i 's#^datadir=$#datadir=/alidata/server/mysql/data#' /etc/init.d/mysqld +cat > /etc/my.cnf < /dev/null;then + echo "nginx already running...." + exit 1 + fi + + echo -n $"Starting $prog!" + $nginxd -c ${nginx_config} + RETVAL=$? + echo + [ $RETVAL = 0 ] && touch /var/lock/nginx + return $RETVAL +} + + +# Stop nginx daemons functions. +stop() { + echo -n $"Stopping $prog!" + $nginxd -s stop + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f /var/lock/nginx +} + + +# reload nginx service functions. +reload() { + + echo -n $"Reloading $prog!" + #kill -HUP `cat ${nginx_pid}` + $nginxd -s reload + RETVAL=$? + echo + +} + +# See how we were called. +case "$1" in +start) + start + ;; + +stop) + stop + ;; + +reload) + reload + ;; + +restart) + stop + start + ;; + +*) + echo $"Usage: $prog {start|stop|restart|reload|help}" + exit 1 +esac + +exit $RETVAL diff --git a/shell/lanmp/nginx/config-nginx/nginx.conf b/shell/lanmp/nginx/config-nginx/nginx.conf new file mode 100644 index 0000000..edf6d46 --- /dev/null +++ b/shell/lanmp/nginx/config-nginx/nginx.conf @@ -0,0 +1,56 @@ + +user www www; +worker_processes 2; + +error_log /alidata/log/nginx/error.log crit; +pid /alidata/server/nginx/logs/nginx.pid; + +#Specifies the value for maximum file descriptors that can be opened by this process. +worker_rlimit_nofile 65535; + +events +{ + use epoll; + worker_connections 65535; +} + + +http { + include mime.types; + default_type application/octet-stream; + + #charset gb2312; + + server_names_hash_bucket_size 128; + client_header_buffer_size 32k; + large_client_header_buffers 4 32k; + client_max_body_size 8m; + + sendfile on; + tcp_nopush on; + + keepalive_timeout 60; + + tcp_nodelay on; + + fastcgi_connect_timeout 300; + fastcgi_send_timeout 300; + fastcgi_read_timeout 300; + fastcgi_buffer_size 64k; + fastcgi_buffers 4 64k; + fastcgi_busy_buffers_size 128k; + fastcgi_temp_file_write_size 128k; + + gzip on; + gzip_min_length 1k; + gzip_buffers 4 16k; + gzip_http_version 1.0; + gzip_comp_level 2; + gzip_types text/plain application/x-javascript text/css application/xml; + gzip_vary on; + #limit_zone crawler $binary_remote_addr 10m; + log_format '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + include /alidata/server/nginx/conf/vhosts/*.conf; +} diff --git a/shell/lanmp/nginx/config-nginx/rewrite/default.conf b/shell/lanmp/nginx/config-nginx/rewrite/default.conf new file mode 100644 index 0000000..e69de29 diff --git a/shell/lanmp/nginx/config-nginx/rewrite/discuz_7.2.conf b/shell/lanmp/nginx/config-nginx/rewrite/discuz_7.2.conf new file mode 100644 index 0000000..df5503a --- /dev/null +++ b/shell/lanmp/nginx/config-nginx/rewrite/discuz_7.2.conf @@ -0,0 +1,6 @@ +rewrite ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2 last; +rewrite ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3 last; +rewrite ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3 last; +rewrite ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro.php?$2=$3 last; +rewrite ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3 last; +rewrite ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2 last; \ No newline at end of file diff --git a/shell/lanmp/nginx/config-nginx/rewrite/discuz_x2.conf b/shell/lanmp/nginx/config-nginx/rewrite/discuz_x2.conf new file mode 100644 index 0000000..f4c24b6 --- /dev/null +++ b/shell/lanmp/nginx/config-nginx/rewrite/discuz_x2.conf @@ -0,0 +1,7 @@ +rewrite ^(.*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last; +rewrite ^(.*)/article-([0-9]+)\.html$ $1/portal.php?mod=article&articleid=$2 last; +rewrite ^(.*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last; +rewrite ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last; +rewrite ^(.*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last; +rewrite ^(.*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last; +rewrite ^(.*)/([a-z]+)-(.+)\.html$ $1/$2.php?rewrite=$3 last; \ No newline at end of file diff --git a/shell/lanmp/nginx/config-nginx/rewrite/ecshop.conf b/shell/lanmp/nginx/config-nginx/rewrite/ecshop.conf new file mode 100644 index 0000000..0dc43c2 --- /dev/null +++ b/shell/lanmp/nginx/config-nginx/rewrite/ecshop.conf @@ -0,0 +1,29 @@ +rewrite ^/index\.html /index.php last; +rewrite ^/category$ /index.php last; +rewrite ^/feed-c([0-9]+)\.xml$ /feed.php?cat=$1 last; +rewrite ^/feed-b([0-9]+)\.xml$ /feed.php?brand=$1 last; +rewrite ^/feed\.xml$ /feed.php last; +rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8 last; +rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*)\.html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5 last; +rewrite ^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5 last; +rewrite ^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*)\.html$ /category.php?id=$1&brand=$2&page=$3 last; +rewrite ^/category-([0-9]+)-b([0-9]+)(.*)\.html$ /category.php?id=$1&brand=$2 last; +rewrite ^/category-([0-9]+)(.*)\.html$ /category.php?id=$1 last; +rewrite ^/goods-([0-9]+)(.*)\.html /goods.php?id=$1 last; +rewrite ^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ /article_cat.php?id=$1&page=$2&sort=$3&order=$4 last; +rewrite ^/article_cat-([0-9]+)-([0-9]+)(.*)\.html$ /article_cat.php?id=$1&page=$2 last; +rewrite ^/article_cat-([0-9]+)(.*)\.html$ /article_cat.php?id=$1 last; +rewrite ^/article-([0-9]+)(.*)\.html$ /article.php?id=$1 last; +rewrite ^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)\.html /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5 last; +rewrite ^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*)\.html /brand.php?id=$1&cat=$2&page=$3 last; +rewrite ^/brand-([0-9]+)-c([0-9]+)(.*)\.html /brand.php?id=$1&cat=$2 last; +rewrite ^/brand-([0-9]+)(.*)\.html /brand.php?id=$1 last; +rewrite ^/tag-(.*)\.html /search.php?keywords=$1 last; +rewrite ^/snatch-([0-9]+)\.html$ /snatch.php?id=$1 last; +rewrite ^/group_buy-([0-9]+)\.html$ /group_buy.php?act=view&id=$1 last; +rewrite ^/auction-([0-9]+)\.html$ /auction.php?act=view&id=$1 last; +rewrite ^/exchange-id([0-9]+)(.*)\.html$ /exchange.php?id=$1&act=view last; +rewrite ^/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ /exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6 last; +rewrite ^/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*)\.html$ /exchange.php?cat_id=$1&page=$2&sort=$3&order=$4 last; +rewrite ^/exchange-([0-9]+)-([0-9]+)(.*)\.html$ /exchange.php?cat_id=$1&page=$2 last; +rewrite ^/exchange-([0-9]+)(.*)\.html$ /exchange.php?cat_id=$1 last; \ No newline at end of file diff --git a/shell/lanmp/nginx/config-nginx/rewrite/phpcms.conf b/shell/lanmp/nginx/config-nginx/rewrite/phpcms.conf new file mode 100644 index 0000000..f1565e9 --- /dev/null +++ b/shell/lanmp/nginx/config-nginx/rewrite/phpcms.conf @@ -0,0 +1,3 @@ +rewrite ^(.*)show-([0-9]+)-([0-9]+)\.html$ $1/show.php?itemid=$2&page=$3 last; +rewrite ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$2&page=$3 last; +rewrite ^(.*)show-([0-9]+)\.html$ $1/show.php?specialid=$2 last; \ No newline at end of file diff --git a/shell/lanmp/nginx/config-nginx/rewrite/phpwind.conf b/shell/lanmp/nginx/config-nginx/rewrite/phpwind.conf new file mode 100644 index 0000000..7c83f72 --- /dev/null +++ b/shell/lanmp/nginx/config-nginx/rewrite/phpwind.conf @@ -0,0 +1,5 @@ +rewrite ^(.*)-htm-(.*)$ $1.php?$2 last; +rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last; +rewrite ^(.*)/data/(.*)\.(htm|php)$ 404.html last; +rewrite ^(.*)/attachment/(.*)\.(htm|php)$ 404.html last; +rewrite ^(.*)/html/(.*)\.(htm|php)$ 404.html last; \ No newline at end of file diff --git a/shell/lanmp/nginx/config-nginx/rewrite/shopex.conf b/shell/lanmp/nginx/config-nginx/rewrite/shopex.conf new file mode 100644 index 0000000..d8758b2 --- /dev/null +++ b/shell/lanmp/nginx/config-nginx/rewrite/shopex.conf @@ -0,0 +1 @@ +rewrite ^/(.+\.(html|xml|json|htm|php|jsp|asp|shtml))$ /index.php?$1 last; \ No newline at end of file diff --git a/shell/lanmp/nginx/config-nginx/rewrite/wordpress.conf b/shell/lanmp/nginx/config-nginx/rewrite/wordpress.conf new file mode 100644 index 0000000..f33e238 --- /dev/null +++ b/shell/lanmp/nginx/config-nginx/rewrite/wordpress.conf @@ -0,0 +1,11 @@ +location / { + if (-f $request_filename/index.html){ + rewrite (.*) $1/index.html break; + } + if (-f $request_filename/index.php){ + rewrite (.*) $1/index.php; + } + if (!-f $request_filename){ + rewrite (.*) /index.php; + } +} \ No newline at end of file diff --git a/shell/lanmp/nginx/config-nginx/vhosts/default.conf.bak b/shell/lanmp/nginx/config-nginx/vhosts/default.conf.bak new file mode 100644 index 0000000..2e11f58 --- /dev/null +++ b/shell/lanmp/nginx/config-nginx/vhosts/default.conf.bak @@ -0,0 +1,24 @@ +server { + listen 80; + server_name localhost; + index index.html index.htm index.php; + root /alidata/www/default; + location ~ .*\.(php|php5)?$ + { + #fastcgi_pass unix:/tmp/php-cgi.sock; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi.conf; + } + location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ + { + expires 30d; + } + location ~ .*\.(js|css)?$ + { + expires 1h; + } + #伪静态规则 + include /alidata/server/nginx/conf/rewrite/default.conf; + access_log /alidata/log/nginx/access/default.log; +} \ No newline at end of file diff --git a/shell/lanmp/nginx/config-nginx/vhosts/phpwind.conf b/shell/lanmp/nginx/config-nginx/vhosts/phpwind.conf new file mode 100644 index 0000000..6970e0a --- /dev/null +++ b/shell/lanmp/nginx/config-nginx/vhosts/phpwind.conf @@ -0,0 +1,24 @@ +server { + listen 80; + server_name localhost; + index index.html index.htm index.php; + root /alidata/www/phpwind; + location ~ .*\.(php|php5)?$ + { + #fastcgi_pass unix:/tmp/php-cgi.sock; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + include fastcgi.conf; + } + location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ + { + expires 30d; + } + location ~ .*\.(js|css)?$ + { + expires 1h; + } + #伪静态规则 + include /alidata/server/nginx/conf/rewrite/phpwind.conf; + access_log /alidata/log/nginx/access/phpwind.log; +} \ No newline at end of file diff --git a/shell/lanmp/nginx/install_nginx-1.0.15.sh b/shell/lanmp/nginx/install_nginx-1.0.15.sh new file mode 100644 index 0000000..1791c71 --- /dev/null +++ b/shell/lanmp/nginx/install_nginx-1.0.15.sh @@ -0,0 +1,33 @@ +#!/bin/bash +rm -rf nginx-1.0.15 +if [ ! -f nginx-1.0.15.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/nginx/nginx-1.0.15.tar.gz +fi +tar zxvf nginx-1.0.15.tar.gz +cd nginx-1.0.15 +./configure --user=www \ +--group=www \ +--prefix=/alidata/server/nginx \ +--with-http_stub_status_module \ +--without-http-cache \ +--with-http_ssl_module \ +--with-http_gzip_static_module +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +chmod 775 /alidata/server/nginx/logs +chown -R www:www /alidata/server/nginx/logs +chmod -R 775 /alidata/www +chown -R www:www /alidata/www +cd .. +cp -fR ./nginx/config-nginx/* /alidata/server/nginx/conf/ +sed -i 's/worker_processes 2/worker_processes '"$CPU_NUM"'/' /alidata/server/nginx/conf/nginx.conf +chmod 755 /alidata/server/nginx/sbin/nginx +#/alidata/server/nginx/sbin/nginx +mv /alidata/server/nginx/conf/nginx /etc/init.d/ +chmod +x /etc/init.d/nginx +/etc/init.d/nginx start \ No newline at end of file diff --git a/shell/lanmp/nginx/install_nginx-1.2.5.sh b/shell/lanmp/nginx/install_nginx-1.2.5.sh new file mode 100644 index 0000000..f0e4e19 --- /dev/null +++ b/shell/lanmp/nginx/install_nginx-1.2.5.sh @@ -0,0 +1,33 @@ +#!/bin/bash +rm -rf nginx-1.2.5 +if [ ! -f nginx-1.2.5.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/nginx/nginx-1.2.5.tar.gz +fi +tar zxvf nginx-1.2.5.tar.gz +cd nginx-1.2.5 +./configure --user=www \ +--group=www \ +--prefix=/alidata/server/nginx \ +--with-http_stub_status_module \ +--without-http-cache \ +--with-http_ssl_module \ +--with-http_gzip_static_module +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +chmod 775 /alidata/server/nginx/logs +chown -R www:www /alidata/server/nginx/logs +chmod -R 775 /alidata/www +chown -R www:www /alidata/www +cd .. +cp -fR ./nginx/config-nginx/* /alidata/server/nginx/conf/ +sed -i 's/worker_processes 2/worker_processes '"$CPU_NUM"'/' /alidata/server/nginx/conf/nginx.conf +chmod 755 /alidata/server/nginx/sbin/nginx +#/alidata/server/nginx/sbin/nginx +mv /alidata/server/nginx/conf/nginx /etc/init.d/ +chmod +x /etc/init.d/nginx +/etc/init.d/nginx start \ No newline at end of file diff --git a/shell/lanmp/nginx/install_nginx-1.4.4.sh b/shell/lanmp/nginx/install_nginx-1.4.4.sh new file mode 100644 index 0000000..c00eae7 --- /dev/null +++ b/shell/lanmp/nginx/install_nginx-1.4.4.sh @@ -0,0 +1,33 @@ +#!/bin/bash +rm -rf nginx-1.8.1 +if [ ! -f nginx-1.8.1.tar.gz ];then + wget http://nginx.org/download/nginx-1.8.1.tar.gz +fi +tar zxvf nginx-1.8.1.tar.gz +cd nginx-1.8.1 +./configure --user=www \ +--group=www \ +--prefix=/opt/nginx \ +--with-http_stub_status_module \ +--without-http-cache \ +--with-http_ssl_module \ +--with-http_gzip_static_module +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +chmod 775 /opt/nginx/logs +chown -R www:www /opt/nginx/logs +chmod -R 775 /data/www +chown -R www:www /data/www +cd .. +cp -fR ./nginx/config-nginx/* /opt/nginx/conf/ +sed -i 's/worker_processes 2/worker_processes '"$CPU_NUM"'/' /opt/nginx/conf/nginx.conf +chmod 755 /opt/nginx/sbin/nginx +#/opt/nginx/sbin/nginx +mv /opt/nginx/conf/nginx /etc/init.d/ +chmod +x /etc/init.d/nginx +/etc/init.d/nginx start \ No newline at end of file diff --git a/shell/lanmp/nginx/install_nginx-1.8.1.sh b/shell/lanmp/nginx/install_nginx-1.8.1.sh new file mode 100644 index 0000000..54f91da --- /dev/null +++ b/shell/lanmp/nginx/install_nginx-1.8.1.sh @@ -0,0 +1,33 @@ +#!/bin/bash +rm -rf nginx-1.8.1 +if [ ! -f nginx-1.8.1.tar.gz ];then + wget http://nginx.org/download/nginx-1.8.1.tar.gz +fi +tar zxvf nginx-1.8.1.tar.gz +cd nginx-1.8.1 +./configure --user=www \ +--group=www \ +--prefix=/opt/nginx \ +--with-http_stub_status_module \ +--without-http-cache \ +--with-http_ssl_module \ +--with-http_gzip_static_module +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +chmod 775 /opt/nginx/logs +chown -R www:www /opt/nginx/logs +chmod -R 775 /data/www +chown -R www:www /data/www +cd .. +cp -fR config-nginx/* /opt/nginx/conf/ +sed -i 's/worker_processes 2/worker_processes '"$CPU_NUM"'/' /opt/nginx/conf/nginx.conf +chmod 755 /opt/nginx/sbin/nginx +#/opt/nginx/sbin/nginx +mv /opt/nginx/conf/nginx /etc/init.d/ +chmod +x /etc/init.d/nginx +/etc/init.d/nginx start \ No newline at end of file diff --git a/shell/lanmp/php/install_httpd_php-5.3.29.sh b/shell/lanmp/php/install_httpd_php-5.3.29.sh new file mode 100644 index 0000000..f3c0ec1 --- /dev/null +++ b/shell/lanmp/php/install_httpd_php-5.3.29.sh @@ -0,0 +1,60 @@ +#!/bin/bash +rm -rf php-5.3.29 +if [ ! -f php-5.3.29.tar.gz ];then + wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/php/php-5.3.29.tar.gz +fi +tar zxvf php-5.3.29.tar.gz +cd php-5.3.29 +./configure --prefix=/usr/local/server/php \ +--with-config-file-path=/usr/local/server/php/etc \ +--with-apxs2=/usr/local/server/httpd/bin/apxs \ +--with-mysql=mysqlnd \ +--with-mysqli=mysqlnd \ +--with-pdo-mysql=mysqlnd \ +--enable-static \ +--enable-maintainer-zts \ +--enable-zend-multibyte \ +--enable-inline-optimization \ +--enable-sockets \ +--enable-wddx \ +--enable-zip \ +--enable-calendar \ +--enable-bcmath \ +--enable-soap \ +--with-zlib \ +--with-iconv \ +--with-gd \ +--with-xmlrpc \ +--enable-mbstring \ +--without-sqlite \ +--with-curl \ +--enable-ftp \ +--with-mcrypt \ +--with-freetype-dir=/usr/local/freetype.2.1.10 \ +--with-jpeg-dir=/usr/local/jpeg.6 \ +--with-png-dir=/usr/local/libpng.1.2.50 \ +--disable-ipv6 \ +--disable-debug \ +--with-openssl \ +--disable-maintainer-zts \ +--disable-safe-mode \ +--disable-fileinfo + +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make ZEND_EXTRA_LIBS='-liconv' -j$CPU_NUM +else + make ZEND_EXTRA_LIBS='-liconv' +fi +make install +cd .. +cp ./php-5.3.29/php.ini-production /usr/local/server/php/etc/php.ini +#adjust php.ini +sed -i 's#; extension_dir = \"\.\/\"#extension_dir = "/usr/local/server/php/lib/php/extensions/no-debug-non-zts-20090626/"#' /usr/local/server/php/etc/php.ini +sed -i 's/post_max_size = 8M/post_max_size = 64M/g' /usr/local/server/php/etc/php.ini +sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 64M/g' /usr/local/server/php/etc/php.ini +sed -i 's/;date.timezone =/date.timezone = PRC/g' /usr/local/server/php/etc/php.ini +sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/g' /usr/local/server/php/etc/php.ini +sed -i 's/max_execution_time = 30/max_execution_time = 300/g' /usr/local/server/php/etc/php.ini +/etc/init.d/httpd restart +sleep 5 diff --git a/shell/lanmp/php/install_httpd_php-5.4.23.sh b/shell/lanmp/php/install_httpd_php-5.4.23.sh new file mode 100644 index 0000000..d4b1576 --- /dev/null +++ b/shell/lanmp/php/install_httpd_php-5.4.23.sh @@ -0,0 +1,60 @@ +#!/bin/bash +rm -rf php-5.4.23 +if [ ! -f php-5.4.23.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/php/php-5.4.23.tar.gz +fi +tar zxvf php-5.4.23.tar.gz +cd php-5.4.23 +./configure --prefix=/alidata/server/php \ +--with-config-file-path=/alidata/server/php/etc \ +--with-apxs2=/alidata/server/httpd/bin/apxs \ +--with-mysql=mysqlnd \ +--with-mysqli=mysqlnd \ +--with-pdo-mysql=mysqlnd \ +--enable-static \ +--enable-maintainer-zts \ +--enable-zend-multibyte \ +--enable-inline-optimization \ +--enable-sockets \ +--enable-wddx \ +--enable-zip \ +--enable-calendar \ +--enable-bcmath \ +--enable-soap \ +--with-zlib \ +--with-iconv \ +--with-gd \ +--with-xmlrpc \ +--enable-mbstring \ +--without-sqlite \ +--with-curl \ +--enable-ftp \ +--with-mcrypt \ +--with-freetype-dir=/usr/local/freetype.2.1.10 \ +--with-jpeg-dir=/usr/local/jpeg.6 \ +--with-png-dir=/usr/local/libpng.1.2.50 \ +--disable-ipv6 \ +--disable-debug \ +--with-openssl \ +--disable-maintainer-zts \ +--disable-safe-mode \ +--disable-fileinfo + +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make ZEND_EXTRA_LIBS='-liconv' -j$CPU_NUM +else + make ZEND_EXTRA_LIBS='-liconv' +fi +make install +cd .. +cp ./php-5.4.23/php.ini-production /alidata/server/php/etc/php.ini +#adjust php.ini +sed -i 's#; extension_dir = \"\.\/\"#extension_dir = "/alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/"#' /alidata/server/php/etc/php.ini +sed -i 's/post_max_size = 8M/post_max_size = 64M/g' /alidata/server/php/etc/php.ini +sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 64M/g' /alidata/server/php/etc/php.ini +sed -i 's/;date.timezone =/date.timezone = PRC/g' /alidata/server/php/etc/php.ini +sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/g' /alidata/server/php/etc/php.ini +sed -i 's/max_execution_time = 30/max_execution_time = 300/g' /alidata/server/php/etc/php.ini +/etc/init.d/httpd restart +sleep 5 \ No newline at end of file diff --git a/shell/lanmp/php/install_httpd_php-5.5.7.sh b/shell/lanmp/php/install_httpd_php-5.5.7.sh new file mode 100644 index 0000000..54b79ad --- /dev/null +++ b/shell/lanmp/php/install_httpd_php-5.5.7.sh @@ -0,0 +1,61 @@ +#!/bin/bash +rm -rf php-5.5.7 +if [ ! -f php-5.5.7.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/php/php-5.5.7.tar.gz +fi +tar zxvf php-5.5.7.tar.gz +cd php-5.5.7 +./configure --prefix=/alidata/server/php \ +--enable-opcache \ +--with-config-file-path=/alidata/server/php/etc \ +--with-apxs2=/alidata/server/httpd/bin/apxs \ +--with-mysql=mysqlnd \ +--with-mysqli=mysqlnd \ +--with-pdo-mysql=mysqlnd \ +--enable-static \ +--enable-maintainer-zts \ +--enable-zend-multibyte \ +--enable-inline-optimization \ +--enable-sockets \ +--enable-wddx \ +--enable-zip \ +--enable-calendar \ +--enable-bcmath \ +--enable-soap \ +--with-zlib \ +--with-iconv \ +--with-gd \ +--with-xmlrpc \ +--enable-mbstring \ +--without-sqlite \ +--with-curl \ +--enable-ftp \ +--with-mcrypt \ +--with-freetype-dir=/usr/local/freetype.2.1.10 \ +--with-jpeg-dir=/usr/local/jpeg.6 \ +--with-png-dir=/usr/local/libpng.1.2.50 \ +--disable-ipv6 \ +--disable-debug \ +--with-openssl \ +--disable-maintainer-zts \ +--disable-safe-mode \ +--disable-fileinfo + +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make ZEND_EXTRA_LIBS='-liconv' -j$CPU_NUM +else + make ZEND_EXTRA_LIBS='-liconv' +fi +make install +cd .. +cp ./php-5.5.7/php.ini-production /alidata/server/php/etc/php.ini +#adjust php.ini +sed -i 's#; extension_dir = \"\.\/\"#extension_dir = "/alidata/server/php/lib/php/extensions/no-debug-non-zts-20121212/"#' /alidata/server/php/etc/php.ini +sed -i 's/post_max_size = 8M/post_max_size = 64M/g' /alidata/server/php/etc/php.ini +sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 64M/g' /alidata/server/php/etc/php.ini +sed -i 's/;date.timezone =/date.timezone = PRC/g' /alidata/server/php/etc/php.ini +sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/g' /alidata/server/php/etc/php.ini +sed -i 's/max_execution_time = 30/max_execution_time = 300/g' /alidata/server/php/etc/php.ini +/etc/init.d/httpd restart +sleep 5 \ No newline at end of file diff --git a/shell/lanmp/php/install_nginx_php-5.3.29.sh b/shell/lanmp/php/install_nginx_php-5.3.29.sh new file mode 100644 index 0000000..ded06a2 --- /dev/null +++ b/shell/lanmp/php/install_nginx_php-5.3.29.sh @@ -0,0 +1,74 @@ +#!/bin/bash +rm -rf php-5.3.29 +if [ ! -f php-5.3.29.tar.gz ];then + wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/php/php-5.3.29.tar.gz +fi +tar zxvf php-5.3.29.tar.gz +cd php-5.3.29 +./configure --prefix=/alidata/server/php \ +--with-config-file-path=/alidata/server/php/etc \ +--with-mysql=mysqlnd \ +--with-mysqli=mysqlnd \ +--with-pdo-mysql=mysqlnd \ +--enable-fpm \ +--enable-fastcgi \ +--enable-static \ +--enable-maintainer-zts \ +--enable-zend-multibyte \ +--enable-inline-optimization \ +--enable-sockets \ +--enable-wddx \ +--enable-zip \ +--enable-calendar \ +--enable-bcmath \ +--enable-soap \ +--with-zlib \ +--with-iconv \ +--with-gd \ +--with-xmlrpc \ +--enable-mbstring \ +--without-sqlite \ +--with-curl \ +--enable-ftp \ +--with-mcrypt \ +--with-freetype-dir=/usr/local/freetype.2.1.10 \ +--with-jpeg-dir=/usr/local/jpeg.6 \ +--with-png-dir=/usr/local/libpng.1.2.50 \ +--disable-ipv6 \ +--disable-debug \ +--with-openssl \ +--disable-maintainer-zts \ +--disable-safe-mode \ +--disable-fileinfo + +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make ZEND_EXTRA_LIBS='-liconv' -j$CPU_NUM +else + make ZEND_EXTRA_LIBS='-liconv' +fi +make install +cd .. +cp ./php-5.3.29/php.ini-production /alidata/server/php/etc/php.ini +#adjust php.ini +sed -i 's#; extension_dir = \"\.\/\"#extension_dir = "/alidata/server/php/lib/php/extensions/no-debug-non-zts-20090626/"#' /alidata/server/php/etc/php.ini +sed -i 's/post_max_size = 8M/post_max_size = 64M/g' /alidata/server/php/etc/php.ini +sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 64M/g' /alidata/server/php/etc/php.ini +sed -i 's/;date.timezone =/date.timezone = PRC/g' /alidata/server/php/etc/php.ini +sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/g' /alidata/server/php/etc/php.ini +sed -i 's/max_execution_time = 30/max_execution_time = 300/g' /alidata/server/php/etc/php.ini +#adjust php-fpm +cp /alidata/server/php/etc/php-fpm.conf.default /alidata/server/php/etc/php-fpm.conf +sed -i 's,user = nobody,user=www,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,group = nobody,group=www,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.min_spare_servers = 1,pm.min_spare_servers = 5,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.max_spare_servers = 3,pm.max_spare_servers = 35,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.max_children = 5,pm.max_children = 100,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.start_servers = 2,pm.start_servers = 20,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,;pid = run/php-fpm.pid,pid = run/php-fpm.pid,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,;error_log = log/php-fpm.log,error_log = /alidata/log/php/php-fpm.log,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,;slowlog = log/$pool.log.slow,slowlog = /alidata/log/php/\$pool.log.slow,g' /alidata/server/php/etc/php-fpm.conf +#self start +install -v -m755 ./php-5.3.29/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm +/etc/init.d/php-fpm start +sleep 5 \ No newline at end of file diff --git a/shell/lanmp/php/install_nginx_php-5.4.23.sh b/shell/lanmp/php/install_nginx_php-5.4.23.sh new file mode 100644 index 0000000..5ea7735 --- /dev/null +++ b/shell/lanmp/php/install_nginx_php-5.4.23.sh @@ -0,0 +1,72 @@ +#!/bin/bash +rm -rf php-5.4.23 +if [ ! -f php-5.4.23.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/php/php-5.4.23.tar.gz +fi +tar zxvf php-5.4.23.tar.gz +cd php-5.4.23 +./configure --prefix=/alidata/server/php \ +--with-config-file-path=/alidata/server/php/etc \ +--with-mysql=mysqlnd \ +--with-mysqli=mysqlnd \ +--with-pdo-mysql=mysqlnd \ +--enable-fpm \ +--enable-fastcgi \ +--enable-static \ +--enable-inline-optimization \ +--enable-sockets \ +--enable-wddx \ +--enable-zip \ +--enable-calendar \ +--enable-bcmath \ +--enable-soap \ +--with-zlib \ +--with-iconv \ +--with-gd \ +--with-xmlrpc \ +--enable-mbstring \ +--without-sqlite \ +--with-curl \ +--enable-ftp \ +--with-mcrypt \ +--with-freetype-dir=/usr/local/freetype.2.1.10 \ +--with-jpeg-dir=/usr/local/jpeg.6 \ +--with-png-dir=/usr/local/libpng.1.2.50 \ +--disable-ipv6 \ +--disable-debug \ +--with-openssl \ +--disable-maintainer-zts \ +--disable-safe-mode \ +--disable-fileinfo + +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make ZEND_EXTRA_LIBS='-liconv' -j$CPU_NUM +else + make ZEND_EXTRA_LIBS='-liconv' +fi +make install +cd .. +cp ./php-5.4.23/php.ini-production /alidata/server/php/etc/php.ini +#adjust php.ini +sed -i 's#; extension_dir = \"\.\/\"#extension_dir = "/alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/"#' /alidata/server/php/etc/php.ini +sed -i 's/post_max_size = 8M/post_max_size = 64M/g' /alidata/server/php/etc/php.ini +sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 64M/g' /alidata/server/php/etc/php.ini +sed -i 's/;date.timezone =/date.timezone = PRC/g' /alidata/server/php/etc/php.ini +sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/g' /alidata/server/php/etc/php.ini +sed -i 's/max_execution_time = 30/max_execution_time = 300/g' /alidata/server/php/etc/php.ini +#adjust php-fpm +cp /alidata/server/php/etc/php-fpm.conf.default /alidata/server/php/etc/php-fpm.conf +sed -i 's,user = nobody,user=www,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,group = nobody,group=www,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.min_spare_servers = 1,pm.min_spare_servers = 5,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.max_spare_servers = 3,pm.max_spare_servers = 35,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.max_children = 5,pm.max_children = 100,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.start_servers = 2,pm.start_servers = 20,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,;pid = run/php-fpm.pid,pid = run/php-fpm.pid,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,;error_log = log/php-fpm.log,error_log = /alidata/log/php/php-fpm.log,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,;slowlog = log/$pool.log.slow,slowlog = /alidata/log/php/\$pool.log.slow,g' /alidata/server/php/etc/php-fpm.conf +#self start +install -v -m755 ./php-5.4.23/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm +/etc/init.d/php-fpm start +sleep 5 \ No newline at end of file diff --git a/shell/lanmp/php/install_nginx_php-5.5.7.sh b/shell/lanmp/php/install_nginx_php-5.5.7.sh new file mode 100644 index 0000000..924907c --- /dev/null +++ b/shell/lanmp/php/install_nginx_php-5.5.7.sh @@ -0,0 +1,73 @@ +#!/bin/bash +rm -rf php-5.5.7 +if [ ! -f php-5.5.7.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/php/php-5.5.7.tar.gz +fi +tar zxvf php-5.5.7.tar.gz +cd php-5.5.7 +./configure --prefix=/alidata/server/php \ +--enable-opcache \ +--with-config-file-path=/alidata/server/php/etc \ +--with-mysql=mysqlnd \ +--with-mysqli=mysqlnd \ +--with-pdo-mysql=mysqlnd \ +--enable-fpm \ +--enable-fastcgi \ +--enable-static \ +--enable-inline-optimization \ +--enable-sockets \ +--enable-wddx \ +--enable-zip \ +--enable-calendar \ +--enable-bcmath \ +--enable-soap \ +--with-zlib \ +--with-iconv \ +--with-gd \ +--with-xmlrpc \ +--enable-mbstring \ +--without-sqlite \ +--with-curl \ +--enable-ftp \ +--with-mcrypt \ +--with-freetype-dir=/usr/local/freetype.2.1.10 \ +--with-jpeg-dir=/usr/local/jpeg.6 \ +--with-png-dir=/usr/local/libpng.1.2.50 \ +--disable-ipv6 \ +--disable-debug \ +--with-openssl \ +--disable-maintainer-zts \ +--disable-safe-mode \ +--disable-fileinfo + +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make ZEND_EXTRA_LIBS='-liconv' -j$CPU_NUM +else + make ZEND_EXTRA_LIBS='-liconv' +fi +make install +cd .. +cp ./php-5.5.7/php.ini-production /alidata/server/php/etc/php.ini +#adjust php.ini +sed -i 's#; extension_dir = \"\.\/\"#extension_dir = "/alidata/server/php/lib/php/extensions/no-debug-non-zts-20121212/"#' /alidata/server/php/etc/php.ini +sed -i 's/post_max_size = 8M/post_max_size = 64M/g' /alidata/server/php/etc/php.ini +sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 64M/g' /alidata/server/php/etc/php.ini +sed -i 's/;date.timezone =/date.timezone = PRC/g' /alidata/server/php/etc/php.ini +sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/g' /alidata/server/php/etc/php.ini +sed -i 's/max_execution_time = 30/max_execution_time = 300/g' /alidata/server/php/etc/php.ini +#adjust php-fpm +cp /alidata/server/php/etc/php-fpm.conf.default /alidata/server/php/etc/php-fpm.conf +sed -i 's,user = nobody,user=www,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,group = nobody,group=www,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.min_spare_servers = 1,pm.min_spare_servers = 5,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.max_spare_servers = 3,pm.max_spare_servers = 35,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.max_children = 5,pm.max_children = 100,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,^pm.start_servers = 2,pm.start_servers = 20,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,;pid = run/php-fpm.pid,pid = run/php-fpm.pid,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,;error_log = log/php-fpm.log,error_log = /alidata/log/php/php-fpm.log,g' /alidata/server/php/etc/php-fpm.conf +sed -i 's,;slowlog = log/$pool.log.slow,slowlog = /alidata/log/php/\$pool.log.slow,g' /alidata/server/php/etc/php-fpm.conf +#self start +install -v -m755 ./php-5.5.7/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm +/etc/init.d/php-fpm start +sleep 5 \ No newline at end of file diff --git a/shell/lanmp/php/install_php_extension.sh b/shell/lanmp/php/install_php_extension.sh new file mode 100644 index 0000000..8fcdf32 --- /dev/null +++ b/shell/lanmp/php/install_php_extension.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +if [ `uname -m` == "x86_64" ];then +machine=x86_64 +else +machine=i686 +fi + +#memcache +if [ ! -f memcache-3.0.6.tgz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/php_extend/memcache-3.0.6.tgz +fi +rm -rf memcache-3.0.6 +tar -xzvf memcache-3.0.6.tgz +cd memcache-3.0.6 +/alidata/server/php/bin/phpize +./configure --enable-memcache --with-php-config=/alidata/server/php/bin/php-config +CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) +if [ $CPU_NUM -gt 1 ];then + make -j$CPU_NUM +else + make +fi +make install +cd .. +echo "extension=memcache.so" >> /alidata/server/php/etc/php.ini + +#zend +if ls -l /alidata/server/ |grep "5.3.18" > /dev/null;then + mkdir -p /alidata/server/php/lib/php/extensions/no-debug-non-zts-20090626/ + if [ $machine == "x86_64" ];then + if [ ! -f ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/php_extend/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz + fi + tar zxvf ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz + mv ./ZendGuardLoader-php-5.3-linux-glibc23-x86_64/php-5.3.x/ZendGuardLoader.so /alidata/server/php/lib/php/extensions/no-debug-non-zts-20090626/ + else + if [ ! -f ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/php_extend/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz + fi + tar zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz + mv ./ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ZendGuardLoader.so /alidata/server/php/lib/php/extensions/no-debug-non-zts-20090626/ + fi + echo "zend_extension=/alidata/server/php/lib/php/extensions/no-debug-non-zts-20090626/ZendGuardLoader.so" >> /alidata/server/php/etc/php.ini + echo "zend_loader.enable=1" >> /alidata/server/php/etc/php.ini + echo "zend_loader.disable_licensing=0" >> /alidata/server/php/etc/php.ini + echo "zend_loader.obfuscation_level_support=3" >> /alidata/server/php/etc/php.ini + echo "zend_loader.license_path=" >> /alidata/server/php/etc/php.ini +elif ls -l /alidata/server/ |grep "5.4.23" > /dev/null;then + mkdir -p /alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/ + if [ $machine == "x86_64" ];then + if [ ! -f ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/php_extend/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz + fi + tar zxvf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz + mv ./ZendGuardLoader-70429-PHP-5.4-linux-glibc23-x86_64/php-5.4.x/ZendGuardLoader.so /alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/ + else + if [ ! -f ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz ];then + wget http://oss.aliyuncs.com/aliyunecs/onekey/php_extend/ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz + fi + tar zxvf ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386.tar.gz + mv ./ZendGuardLoader-70429-PHP-5.4-linux-glibc23-i386/php-5.4.x/ZendGuardLoader.so /alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/ + fi + echo "zend_extension=/alidata/server/php/lib/php/extensions/no-debug-non-zts-20100525/ZendGuardLoader.so" >> /alidata/server/php/etc/php.ini + echo "zend_loader.enable=1" >> /alidata/server/php/etc/php.ini + echo "zend_loader.disable_licensing=0" >> /alidata/server/php/etc/php.ini + echo "zend_loader.obfuscation_level_support=3" >> /alidata/server/php/etc/php.ini + echo "zend_loader.license_path=" >> /alidata/server/php/etc/php.ini +elif ls -l /alidata/server/ |grep "5.5.7" > /dev/null;then + mkdir -p /alidata/server/php/lib/php/extensions/no-debug-non-zts-20121212/ + sed -i 's#\[opcache\]#\[opcache\]\nzend_extension=opcache.so#' /alidata/server/php/etc/php.ini + sed -i 's#;opcache.enable=0#opcache.enable=1#' /alidata/server/php/etc/php.ini +fi \ No newline at end of file diff --git a/shell/lanmp/readme.php b/shell/lanmp/readme.php new file mode 100644 index 0000000..fccc4e9 --- /dev/null +++ b/shell/lanmp/readme.php @@ -0,0 +1,42 @@ +------------------------- 自动安装过程 ------------------------- + + +此安装包包含的软件及版本为: +nginx:1.0.15、1.2.5、1.4.4(删除老版本1.0.4) +apache:2.2.22、2.4.2 +mysql:5.1.73、5.5.35、5.6.15 +php:5.3.18、5.4.23、5.5.7(删除老版本5.2.17) +php扩展:memcache、Zend Engine/OPcache +ftp:(yum/apt-get安装) +phpwind:8.7 GBK +phpmyadmin:3.2.2.2 + +安装步骤: + +xshell/xftp上传sh目录 + +chmod –R 777 sh +cd sh +./install.sh + +安装完成后请查看account.log文件,数据库密码在里面。 + + +以下为此脚本在阿里云linux系统测试记录(抽样测试): +centos 5.8/64位/4核4G/50数据盘 --->测试ok +centos 5.8/64位/1核512M/30G数据盘 --->测试ok + +centos 6.3/64位/1核512M/无数据盘 --->测试ok +centos 6.3/64位/4核4G/50G数据盘 --->测试ok + +redhat 5.7/64位/4核4G/50数据盘 --->测试ok +redhat 5.7/64位/1核512M/无数据盘 --->测试ok + + +ubuntu 12.04/64位/4核4G/50G数据盘 --->测试ok +ubuntu 12.04/64位/1核512M/无数据盘 --->测试ok + + +debian 6.0.6/64位/1核512M/无数据盘 --->测试ok +debian 6.0.6/64位/1核512M/30G数据盘 --->测试ok + diff --git a/shell/lanmp/res/init_mysql.php b/shell/lanmp/res/init_mysql.php new file mode 100644 index 0000000..8e7e9b5 --- /dev/null +++ b/shell/lanmp/res/init_mysql.php @@ -0,0 +1,26 @@ + /dev/null ;then + if ls /dev/xvdb1 &> /dev/null;then + if cat /etc/fstab|grep /alidata > /dev/null ;then + if cat /etc/fstab|grep /alidata|grep ext3 > /dev/null ;then + sed -i "/\/alidata/d" /etc/fstab + fi + else + echo '/dev/xvdb1 /alidata ext4 defaults 0 0' >> /etc/fstab + fi + mount -a + fi +else + if ls /dev/xvdb1 &> /dev/null;then + if cat /etc/fstab|grep /alidata > /dev/null ;then + echo "" + else + echo '/dev/xvdb1 /alidata ext3 defaults 0 0' >> /etc/fstab + fi + mount -a + fi +fi + +/etc/init.d/mysqld stop &> /dev/null +/etc/init.d/nginx stop &> /dev/null +/etc/init.d/php-fpm stop &> /dev/null +/etc/init.d/vsftpd stop &> /dev/null +/etc/init.d/httpd stop &> /dev/null +killall mysqld &> /dev/null +killall nginx &> /dev/null +killall httpd &> /dev/null +killall apache2 &> /dev/null +killall vsftpd &> /dev/null +killall php-fpm &> /dev/null + +echo "--------> Clean up the installation environment" +rm -rf /usr/local/freetype.2.1.10 +rm -rf /usr/local/libpng.1.2.50 +rm -rf /usr/local/freetype.2.1.10 +rm -rf /usr/local/libpng.1.2.50 +rm -rf /usr/local/jpeg.6 + +echo "" +echo "--------> Delete directory" +echo "/alidata/server/mysql delete ok!" +rm -rf /alidata/server/mysql +echo "rm -rf /alidata/server/mysql-* delete ok!" +rm -rf /alidata/server/mysql-* +echo "/alidata/server/php delete ok!" +rm -rf /alidata/server/php +echo "/alidata/server/php-* delete ok!" +rm -rf /alidata/server/php-* +echo "/alidata/server/nginx delete ok!" +rm -rf /alidata/server/nginx +echo "rm -rf /alidata/server/nginx-* delete ok!" +rm -rf /alidata/server/nginx-* +echo "/alidata/server/httpd delete ok!" +rm -rf /alidata/server/httpd +echo "/alidata/server/httpd-* delete ok!" +rm -rf /alidata/server/httpd-* +echo "" +echo "/alidata/log/php delete ok!" +rm -rf /alidata/log/php +echo "/alidata/log/mysql delete ok!" +rm -rf /alidata/log/mysql +echo "/alidata/log/nginx delete ok!" +rm -rf /alidata/log/nginx +echo "/alidata/log/httpd delete ok!" +rm -rf /alidata/log/httpd +echo "" +echo "/alidata/www/phpwind delete ok!" +rm -rf /alidata/www/phpwind + + +echo "" +echo "--------> Delete file" +echo "/etc/my.cnf delete ok!" +rm -f /etc/my.cnf +echo "/etc/init.d/mysqld delete ok!" +rm -f /etc/init.d/mysqld +echo "/etc/init.d/nginx delete ok!" +rm -f /etc/init.d/nginx +echo "/etc/init.d/php-fpm delete ok!" +rm -r /etc/init.d/php-fpm +echo "/etc/init.d/httpd delete ok!" +rm -f /etc/init.d/httpd + +echo "" +ifrpm=$(cat /proc/version | grep -E "redhat|centos") +ifdpkg=$(cat /proc/version | grep -Ei "ubuntu|debian") +ifcentos=$(cat /proc/version | grep centos) +echo "--------> Clean up files" +echo "/etc/rc.local clean ok!" +if [ "$ifrpm" != "" ];then + if [ -L /etc/rc.local ];then + echo "" + else + \cp /etc/rc.local /etc/rc.local.bak + rm -rf /etc/rc.local + ln -s /etc/rc.d/rc.local /etc/rc.local + fi + sed -i "/\/etc\/init\.d\/mysqld.*/d" /etc/rc.d/rc.local + sed -i "/\/etc\/init\.d\/nginx.*/d" /etc/rc.d/rc.local + sed -i "/\/etc\/init\.d\/php-fpm.*/d" /etc/rc.d/rc.local + sed -i "/\/etc\/init\.d\/vsftpd.*/d" /etc/rc.d/rc.local + sed -i "/\/etc\/init\.d\/httpd.*/d" /etc/rc.d/rc.local +else + sed -i "/\/etc\/init\.d\/mysqld.*/d" /etc/rc.local + sed -i "/\/etc\/init\.d\/nginx.*/d" /etc/rc.local + sed -i "/\/etc\/init\.d\/php-fpm.*/d" /etc/rc.local + sed -i "/\/etc\/init\.d\/vsftpd.*/d" /etc/rc.local + sed -i "/\/etc\/init\.d\/httpd.*/d" /etc/rc.local +fi + +echo "" +echo "/etc/profile clean ok!" +sed -i "/export PATH=\$PATH\:\/alidata\/server\/mysql\/bin.*/d" /etc/profile +source /etc/profile + +echo "" +if [ "$ifrpm" != "" ];then + yum -y remove vsftpd &> /dev/null + cp -f ./ftp/config-ftp/rpm_ftp/* /etc/vsftpd/ + rm -f /etc/vsftpd/chroot_list + rm -f /etc/vsftpd/ftpusers + rm -f /etc/vsftpd/user_list + rm -f /etc/vsftpd/vsftpd.conf +else + apt-get -y remove vsftpd + rm -f /etc/vsftpd.conf + rm -f /etc/vsftpd.chroot_list + rm -f /etc/vsftpd.user_list + rm -rf /etc/pam.d/vsftpd +fi +echo "vsftpd remove ok!"