+ import the setting files for zentaomos.
This commit is contained in:
Executable
+4
@@ -0,0 +1,4 @@
|
||||
echo "This tool is used to add user to access phpmyadmin.";
|
||||
read -p "Account: " account
|
||||
read -s -p "Password: " password
|
||||
htpasswd -b users $account $password
|
||||
@@ -0,0 +1,121 @@
|
||||
# server basic settings.
|
||||
ServerRoot "/srv/www"
|
||||
DocumentRoot "/srv/www"
|
||||
Listen 80
|
||||
User apache
|
||||
Group apache
|
||||
ServerAdmin zentao@localhost.net
|
||||
ServerName localhost
|
||||
EnableMMAP off
|
||||
EnableSendfile off
|
||||
TypesConfig /etc/httpd/mime.types
|
||||
|
||||
# performance settings.
|
||||
Timeout 300
|
||||
KeepAlive On
|
||||
MaxKeepAliveRequests 100
|
||||
KeepAliveTimeout 5
|
||||
UseCanonicalName Off
|
||||
HostnameLookups Off
|
||||
|
||||
# security.
|
||||
AccessFileName .ztaccess
|
||||
ServerTokens Prod
|
||||
ServerSignature Off
|
||||
|
||||
# deflat.
|
||||
AddType image/x-icon .ico
|
||||
AddType image/gif .gif
|
||||
AddType image/jpeg .jpg .jpeg
|
||||
AddType image/png .png
|
||||
AddType application/javascript .js
|
||||
DeflateCompressionLevel 9
|
||||
AddOutputFilterByType DEFLATE text/html text/css application/javascript
|
||||
|
||||
# modules.
|
||||
LoadModule authn_file_module /usr/lib/httpd/modules/mod_authn_file.so
|
||||
LoadModule access_compat_module /usr/lib/httpd/modules/mod_access_compat.so
|
||||
LoadModule authn_core_module /usr/lib/httpd/modules/mod_authn_core.so
|
||||
LoadModule auth_basic_module /usr/lib/httpd/modules/mod_auth_basic.so
|
||||
LoadModule authz_core_module /usr/lib/httpd/modules/mod_authz_core.so
|
||||
LoadModule authz_host_module /usr/lib/httpd/modules/mod_authz_host.so
|
||||
LoadModule authz_user_module /usr/lib/httpd/modules/mod_authz_user.so
|
||||
|
||||
LoadModule deflate_module /usr/lib/httpd/modules/mod_deflate.so
|
||||
LoadModule expires_module /usr/lib/httpd/modules/mod_expires.so
|
||||
LoadModule rewrite_module /usr/lib/httpd/modules/mod_rewrite.so
|
||||
|
||||
LoadModule autoindex_module /usr/lib/httpd/modules/mod_autoindex.so
|
||||
LoadModule dir_module /usr/lib/httpd/modules/mod_dir.so
|
||||
|
||||
LoadModule env_module /usr/lib/httpd/modules/mod_env.so
|
||||
LoadModule setenvif_module /usr/lib/httpd/modules/mod_setenvif.so
|
||||
LoadModule mime_module /usr/lib/httpd/modules/mod_mime.so
|
||||
LoadModule filter_module /usr/lib/httpd/modules/mod_filter.so
|
||||
|
||||
LoadModule unixd_module /usr/lib/httpd/modules/mod_unixd.so
|
||||
LoadModule mpm_event_module /usr/lib/httpd/modules/mod_mpm_event.so
|
||||
|
||||
LoadModule log_config_module /usr/lib/httpd/modules/mod_log_config.so
|
||||
LoadModule alias_module /usr/lib/httpd/modules/mod_alias.so
|
||||
|
||||
# php module.
|
||||
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
|
||||
AddType application/x-httpd-php .php
|
||||
|
||||
# sub module.
|
||||
LoadModule dav_module /usr/lib/httpd/modules/mod_dav.so
|
||||
LoadModule dav_fs_module /usr/lib/httpd/modules/mod_dav_fs.so
|
||||
LoadModule dav_svn_module /usr/lib/httpd/modules/mod_dav_svn.so
|
||||
LoadModule authz_svn_module /usr/lib/httpd/modules/mod_authz_svn.so
|
||||
|
||||
# directory settings.
|
||||
DirectoryIndex index.html index.htm index.php
|
||||
<Directory />
|
||||
AllowOverride none
|
||||
Require all denied
|
||||
</Directory>
|
||||
<Directory "/srv/www/">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
<Files ".zt*">
|
||||
Require all denied
|
||||
</Files>
|
||||
|
||||
# logs
|
||||
ErrorLog "/var/log/httpd/error.log"
|
||||
LogLevel warn
|
||||
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||
CustomLog "/var/log/httpd/access_log" combined
|
||||
|
||||
# If you want visit zentao like http://localhost/, uncomment these lines.
|
||||
#<VirtualHost *:80>
|
||||
# ServerAdmin zentao@local.net
|
||||
# DocumentRoot "/srv/zentao/www"
|
||||
# ServerName localhost
|
||||
# <Directory />
|
||||
# AllowOverride none
|
||||
# Require all granted
|
||||
# </Directory>
|
||||
# ErrorLog "/var/log/httpd/error_log"
|
||||
# CustomLog "/var/log/httpd/access_log" combind
|
||||
#</VirtualHost>
|
||||
|
||||
# setting for zentao.
|
||||
Alias /zentao "/srv/zentao/www/"
|
||||
<Directory "/srv/zentao/www">
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
# setting for admin
|
||||
Alias /phpmyadmin "/srv/phpmyadmin"
|
||||
<Directory "/srv/phpmyadmin">
|
||||
AuthName 'zentao admin(run /srv/auth/adduser.sh to add user.)'
|
||||
AuthType Basic
|
||||
AuthUserFile /srv/auth/users
|
||||
require valid-user
|
||||
</Directory>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
|
||||
$config->langs['cn'] = '中文简体';
|
||||
$config->langs['en'] = 'EN';
|
||||
|
||||
$lang->cn->title = '欢迎使用禅道管理操作系统!';
|
||||
$lang->cn->poweredBy = "zentaomos 1.0";
|
||||
|
||||
$lang->cn->links['zentao']['link'] = '/zentao/';
|
||||
$lang->cn->links['zentao']['text'] = '访问禅道';
|
||||
$lang->cn->links['zentao']['target'] = '_self';
|
||||
|
||||
$lang->cn->links['official']['link'] = 'http://www.zentao.net/';
|
||||
$lang->cn->links['official']['text'] = '禅道官网';
|
||||
$lang->cn->links['official']['target'] = '_blank';
|
||||
|
||||
$lang->cn->links['phpmyadmin']['link'] = '/phpmyadmin/';
|
||||
$lang->cn->links['phpmyadmin']['text'] = '数据库管理';
|
||||
$lang->cn->links['phpmyadmin']['target'] = '_blank';
|
||||
|
||||
$lang->cn->links['phpinfo']['link'] = '?mode=phpinfo';
|
||||
$lang->cn->links['phpinfo']['text'] = 'PHP信息';
|
||||
$lang->cn->links['phpinfo']['target'] = '_blank';
|
||||
|
||||
$lang->en->title = 'Welcome to use zentao management operating system!';
|
||||
$lang->en->poweredBy = "zentaomos 1.0";
|
||||
|
||||
$lang->en->links['zentao']['link'] = '/zentao/';
|
||||
$lang->en->links['zentao']['text'] = 'ZenTao';
|
||||
$lang->en->links['zentao']['target'] = '_self';
|
||||
|
||||
$lang->en->links['official']['link'] = 'http://www.zentao.net/';
|
||||
$lang->en->links['official']['text'] = 'Community';
|
||||
$lang->en->links['official']['target'] = '_blank';
|
||||
|
||||
$lang->en->links['phpmyadmin']['link'] = '/phpmyadmin/';
|
||||
$lang->en->links['phpmyadmin']['text'] = 'MySQL';
|
||||
$lang->en->links['phpmyadmin']['target'] = '_blank';
|
||||
|
||||
$lang->en->links['phpinfo']['link'] = '?mode=phpinfo';
|
||||
$lang->en->links['phpinfo']['text'] = 'PHP';
|
||||
$lang->en->links['phpinfo']['target'] = '_blank';
|
||||
|
||||
if(is_file('./my.php')) include './my.php';
|
||||
|
||||
$acceptLang = stripos($_SERVER['HTTP_ACCEPT_LANGUAGE'], 'zh-CN') !== false ? 'cn' : 'en';
|
||||
$acceptLang = isset($_GET['lang']) ? $_GET['lang'] : $acceptLang;
|
||||
$clientLang = $lang->$acceptLang;
|
||||
?>
|
||||
<?php if(isset($_GET['mode']) and $_GET['mode'] == 'phpinfo') die(phpinfo());?>
|
||||
<html xmlns='http://www.w3.org/1999/xhtml'>
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
|
||||
<meta http-equiv="refresh" content="5; url=/zentao/" />
|
||||
<title><?php echo $clientLang->title;?></title>
|
||||
<link href="/zentao/theme/default/style.css" rel="stylesheet" type="text/css">
|
||||
<link href="/zentao/theme/default/yui.css" rel="stylesheet" type="text/css">
|
||||
<style>
|
||||
html {background-color:#06294e;}
|
||||
table{margin-top:200px; background:white; border:none}
|
||||
tr, th, td{border:none}
|
||||
#welcome{font-size:20px}
|
||||
#logo{width:120px; border-right:1px solid #efefef}
|
||||
#links{padding-left:25px}
|
||||
#links a{display:block; width:100px; height:25px; line-height:25px; float:left; margin-right:5px; border:1px solid gray; background:#efefef; text-decoration:none; text-align:center}
|
||||
#links #zentao{background:green; color:#efefef}
|
||||
#power{background:#efefef}
|
||||
.button-c{width:100px}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table class='table-5' align='center'>
|
||||
<tr class='colhead'><th colspan='2' id='welcome'><?php echo $clientLang->title;?></th></tr>
|
||||
<tr>
|
||||
<td id='logo'><img src='/zentao/theme/default/images/main/logo2.png' /></td>
|
||||
<td id='links'><?php foreach($clientLang->links as $linkID => $link) echo "<a id='$linkID' href='$link[link]' target='$link[target]'>$link[text]</a>";?></td>
|
||||
</tr>
|
||||
<tr id='power'>
|
||||
<td class='a-right' colspan='2'>
|
||||
<?php
|
||||
echo $clientLang->poweredBy . ' ';
|
||||
foreach($config->langs as $langCode => $langName) echo "<a href='?lang=$langCode'>$langName</a>";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,42 @@
|
||||
[client]
|
||||
port = 3306
|
||||
socket = /run/mysqld/mysqld.sock
|
||||
|
||||
[mysqld]
|
||||
user = mysql
|
||||
port = 3306
|
||||
datadir = /srv/mysql
|
||||
socket = /run/mysqld/mysqld.sock
|
||||
server-id = 1
|
||||
|
||||
key_buffer = 16M
|
||||
max_allowed_packet = 1M
|
||||
sort_buffer_size = 512K
|
||||
net_buffer_length = 16K
|
||||
myisam_sort_buffer_size = 8M
|
||||
default-storage-engine = MyISAM
|
||||
|
||||
skip-external-locking
|
||||
skip-name-resolve
|
||||
|
||||
[mysqldump]
|
||||
quick
|
||||
max_allowed_packet = 16M
|
||||
|
||||
[mysql]
|
||||
no-auto-rehash
|
||||
|
||||
[isamchk]
|
||||
key_buffer = 20M
|
||||
sort_buffer_size = 20M
|
||||
read_buffer = 2M
|
||||
write_buffer = 2M
|
||||
|
||||
[myisamchk]
|
||||
key_buffer = 20M
|
||||
sort_buffer_size = 20M
|
||||
read_buffer = 2M
|
||||
write_buffer = 2M
|
||||
|
||||
[mysqlhotcopy]
|
||||
interactive-timeout
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$cfg['blowfish_secret'] = 'zentaomos';
|
||||
$cfg['Servers'][1]['auth_type'] = 'config';
|
||||
$cfg['Servers'][1]['user'] = 'root';
|
||||
$cfg['Servers'][1]['password'] = '';
|
||||
$cfg['Servers'][1]['port'] = '3306';
|
||||
$cfg['Servers'][1]['host'] = 'localhost';
|
||||
$cfg['Servers'][1]['connect_type'] = 'tcp';
|
||||
$cfg['Servers'][1]['extension'] = 'mysql';
|
||||
$cfg['Servers'][1]['AllowNoPassword'] = true;
|
||||
Reference in New Issue
Block a user