顯示具有 Atmail Webmail Installatioin 標籤的文章。 顯示所有文章
顯示具有 Atmail Webmail Installatioin 標籤的文章。 顯示所有文章

2009年2月26日 星期四

Make Symbolic link for mirror Rsync

Symbolic link : atmail
Real Directory : atmaildata

atmail -> atmaildata

1. rename the existing directory name (main and mirror server).
mv atmail atmaildata


2. modify the rsync.sh in the main server.
vi rsync.sh
change /usr/local/atmail --> /usr/local/atmaildata


3. change own for the symbolic link (main and mirror server).
chown -h atmail:atmail atmail


2008年12月29日 星期一

set ssh connect without password prompt



in mirror computer ( 192.168.1.139)
create ssh key & place it to server


cd /home/atmail/.ssh/
su atmail
ssh-keygen -f atmailrsync
scp atmailrsync.pub 192.168.1.7:/home/atmail/.ssh/authorized_keys


connect the server with the ssh key

su atmail
ssh -i /home/atmail/.ssh/atmailrsync atmail@192.168.1.7

2008年12月28日 星期日

How to Install PHP mbstring extension

1. sudo yum install php-mbstring / yum install php-mbstring
( may be need run more times )

2. service httpd restart

2008年11月5日 星期三

Disable Firewall Setting for AtMail

1. Turn off Firewall






















2. Turn off Selinux






















3. add the port 25 (2-way) and port 110 in Hardware Firewall


4. check the smtp and pop3 port is open, and firewall is no any rule in the Fedora.

# netstat -tulpn | grep :25
# netstat -tulpn | grep :110
# iptables -L -n






2008年11月1日 星期六

Securing the Initial MySQL Accounts

http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html

Part of the MySQL installation process is to set up the mysql database that contains the grant tables:

  • Windows distributions contain preinitialized grant tables that are installed automatically.

  • On Unix, the grant tables are populated by the mysql_install_db program. Some installation methods run this program for you. Others require that you execute it manually. For details, see Section 2.17.2, 「Unix Post-Installation Procedures」.

The grant tables define the initial MySQL user accounts and their access privileges. These accounts are set up as follows:

  • Accounts with the username root are created. These are superuser accounts that can do anything. The initial root account passwords are empty, so anyone can connect to the MySQL server as rootwithout a password — and be granted all privileges.

    • On Windows, one root account is created; this account allows connecting from the local host only. The Windows installer will optionally create an account allowing for connections from any host only if the user selects the Enable root access from remote machines option during installation.

    • On Unix, both root accounts are for connections from the local host. Connections must be made from the local host by specifying a hostname of localhost for one of the accounts, or the actual hostname or IP number for the other.

  • Two anonymous-user accounts are created, each with an empty username. The anonymous accounts have no password, so anyone can use them to connect to the MySQL server.

    • On Windows, one anonymous account is for connections from the local host. It has no global privileges. (Before MySQL 5.1.16, it has all global privileges, just like the root accounts.) The other is for connections from any host and has all privileges for the test database and for other databases with names that start with test.

    • On Unix, both anonymous accounts are for connections from the local host. Connections must be made from the local host by specifying a hostname of localhost for one of the accounts, or the actual hostname or IP number for the other. These accounts have all privileges for the test database and for other databases with names that start with test_.

As noted, none of the initial accounts have passwords. This means that your MySQL installation is unprotected until you do something about it:

  • If you want to prevent clients from connecting as anonymous users without a password, you should either assign a password to each anonymous account or else remove the accounts.

  • You should assign a password to each MySQL root account.

The following instructions describe how to set up passwords for the initial MySQL accounts, first for the anonymous accounts and then for the root accounts. Replace 「newpwd」 in the examples with the actual password that you want to use. The instructions also cover how to remove the anonymous accounts, should you prefer not to allow anonymous access at all.

You might want to defer setting the passwords until later, so that you don't need to specify them while you perform additional setup or testing. However, be sure to set them before using your installation for production purposes.

Anonymous Account Password Assignment

To assign passwords to the anonymous accounts, connect to the server as root and then use either SET PASSWORD or UPDATE. In either case, be sure to encrypt the password using the PASSWORD() function.

To use SET PASSWORD on Windows, do this:

shell> mysql -u root
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR ''@'%' = PASSWORD('newpwd');

To use SET PASSWORD on Unix, do this:

shell> mysql -u root
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');

In the second SET PASSWORD statement, replace host_name with the name of the server host. This is the name that is specified in the Host column of the non-localhost record for root in the user table. If you don't know what hostname this is, issue the following statement before using SET PASSWORD:

mysql> SELECT Host, User FROM mysql.user;

Look for the record that has root in the User column and something other than localhost in the Host column. Then use that Host value in the second SET PASSWORD statement.

Anonymous Account Removal

If you prefer to remove the anonymous accounts instead, do so as follows:

shell> mysql -u root
mysql> DROP USER '';

The DROP statement applies both to Windows and to Unix. On Windows, if you want to remove only the anonymous account that has the same privileges as root, do this instead:

shell> mysql -u root
mysql> DROP USER ''@'localhost';

That account allows anonymous access but has full privileges, so removing it improves security.

root Account Password Assignment

You can assign passwords to the root accounts in several ways. The following discussion demonstrates three methods:

  • Use the SET PASSWORD statement

  • Use the mysqladmin command-line client program

  • Use the UPDATE statement

To assign passwords using SET PASSWORD, connect to the server as root and issue SET PASSWORD statements. Be sure to encrypt the password using the PASSWORD() function.

For Windows, do this:

shell> mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'%' = PASSWORD('newpwd');

For Unix, do this:

shell> mysql -u root

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'host_name' = PASSWORD('newpwd');
 

In the second SET PASSWORD statement, replace host_name with the name of the server host. This is the same hostname that you used when you assigned the anonymous account passwords.

If the user table contains an account with User and Host values of 'root' and '127.0.0.1', use an additional SET PASSWORD statement to set that account's password:

mysql> SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('newpwd');

To assign passwords to the root accounts using mysqladmin, execute the following commands:

shell> mysqladmin -u root password "newpwd"
shell> mysqladmin -u root -h host_name password "newpwd"

These commands apply both to Windows and to Unix. In the second command, replace host_name with the name of the server host. The double quotes around the password are not always necessary, but you should use them if the password contains spaces or other characters that are special to your command interpreter.

The mysqladmin method of setting the root account passwords does not set the password for the 'root'@'127.0.0.1' account. To do so, use SET PASSWORD as shown earlier.

You can also use UPDATE to modify the user table directly. The following UPDATE statement assigns a password to all root accounts:

shell> mysql -u root
mysql> UPDATE mysql.user SET Password = PASSWORD('newpwd')
-> WHERE User = 'root';
mysql> FLUSH PRIVILEGES;

The UPDATE statement applies both to Windows and to Unix.

After the passwords have been set, you must supply the appropriate password whenever you connect to the server. For example, if you want to use mysqladmin to shut down the server, you can do so using this command:

shell> mysqladmin -u root -p shutdown
Enter password: (enter root password here)

2008年10月30日 星期四

Installing MySQL from tar.gz Packages on Other Unix-Like Systems


http://dev.mysql.com/doc/refman/5.0/en/installing-binary.html

This section covers the installation of MySQL binary distributions that are provided for various platforms in the form of compressed tar files (files with a .tar.gz extension). See Section 2.4.3.4, 「MySQL Binaries Compiled by MySQL AB」, for a detailed list.

To obtain MySQL, see Section 2.5, 「How to Get MySQL」.

MySQL tar file binary distributions have names of the form mysql-VERSION-OS.tar.gz, where VERSION is a number (for example, 5.0.72), and OS indicates the type of operating system for which the distribution is intended (for example, pc-linux-i686).

In addition to these generic packages, we also offer binaries in platform-specific package formats for selected platforms. See Section 2.8, 「Standard MySQL Installation Using a Binary Distribution」, for more information on how to install these.

You need the following tools to install a MySQL tar file binary distribution:

  • GNU gunzip to uncompress the distribution.

  • A reasonable tar to unpack the distribution. GNU tar is known to work. Some operating systems come with a preinstalled version of tar that is known to have problems. For example, Mac OS X tar and Sun tar are known to have problems with long filenames. On Mac OS X, you can use the preinstalled gnutar program. On other systems with a deficient tar, you should install GNU tar first.

If you run into problems and need to file a bug report, please use the instructions in Section 1.7, 「How to Report Bugs or Problems」.

The basic commands that you must execute to install and use a MySQL binary distribution are:

shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell> ln -s full-path-to-mysql-VERSION-OS mysql
shell> cd mysql
shell> chown -R mysql .
shell> chgrp -R mysql .
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data

Start Mysql Services (or --user=root)
shell> bin/mysqld_safe --user=mysql &

Note

This procedure does not set up any passwords for MySQL accounts. After

following the procedure, proceed to Section 2.17, 「Post-Installation Setup and Testing」.

A more detailed version of the p

receding description for installing a binary distribution follows:

  1. Add a login user and group for mysqld to run as:

    shell> groupadd mysql
    shell> useradd -g mysql mysql

    These commands add the mysql group and the mysql user. The syntax for useradd and groupadd may differ slightly on different versions of Unix, or they may have different names such as adduser and addgroup.

    You might want to call the user and group something else instead of mysql. If so, substitute the appropriate name in the following

    steps.

  2. Pick the directory under which you want to unpack the distribution and change location into it. In the following example, we unpack the distribution under /usr/local. (The instructions, therefore, assume that you have permission to create files and directories in /usr/local. If that directory is protected, you must perform the installation as root.)

    shell> cd /usr/local
  3. Obtain a distribution file using the instructions in Section 2.5, 「How to Get MySQL」. For a given release, binary distributions for all platforms are built from the same MySQL source distribution.

  4. Unpack the distribution, which creates the installation directory. Then create a symbolic link to that directory:

    shell> gunzip < /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
    shell> ln -s full-path-to-mysql-VERSION-OS mysql

    The tar command creates a directory named mysql-VERSION-OS. The ln command makes a symbolic link to that directory. This lets you refer more easily to the installation directory as /usr/local/mysql.

    With GNU tar, no separate invocation of gunzip is necessary. You can replace the first line with the following alternative command to uncompress and extract the distribution:

    shell> tar zxvf /path/to/mysql-VERSION-OS.tar.gz
  5. Change location into the installation directory:

    shell> cd mysql

    You will find several files and subdirectories in the mysql directory. The most important for installation purposes are the bin and

    scripts subdirectories:

    • The bin directory contains cli

      ent programs and the server. You should add the full pathname of this directory to your PATH environment variable so that your shell finds the MySQL programs properly. See Section 2.21, 「Environment Variables」.

    • The scripts directory contains the mysql_install_db script used to initialize the mysql database containing the grant tables that store the server access permissions.

  6. Ensure that the distribution contents are accessible to mysql. If you unpacked the distribution as mysql, no further action is required. If you unpacked the distribution as root, its contents will be owned by root. Change its ownership to mysql by executing the following commands as root in the installation directory:

    shell> chown -R mysql .
    shell> chgrp -R mysql .


    The first command changes the owner attribute of the files to the mysql user. The second changes the group attribute to the mysql group.

  7. If you have not installed MySQL before, you must create the MySQL data directory and initialize the grant tables:

    shell> scripts/mysql_install_db --user=mysql

    If you run the command as root, include the --user option as shown. If you run the command while logged in as that user

    , you can omit the --user option.

    The command should create the data directory and its contents with mysql as the owner.

    After creating or updating the grant tables, you need to restart the server manually.

  8. Most of the MySQL installation can be owned by root if you like. The exception is that the data directory must be owned by mysql. To accomplish this, run the following commands as root in the installation directory:

    shell> chown -R root .

    shell> chown -R mysql data


  9. If you want MySQL to start automatically when you boot your machine, you can copy support-files/mysql.server to the location where your system has its startup files. More information can be found in the support-files/mysql.server script itself and in Section 2.17.2.2, 「Starting and Stopping MySQL Automatically」.

  10. You can set up new accounts using the bin/mysql_setpermission script if you install the DBI and DBD::mysql Perl modules. See Section 4.6.14, 「mysql_setpermission — Interactively Set Permissions in Grant Tables」. For Perl module installation instructions, see Section 2.22, 「Perl Installation Notes」.

  11. If you would like to use mysqlaccess and have the MySQL distribution in some non-standard location, you must change the location where mysqlaccess expects to find the mysql client. Edit the bin/mysqlaccess

    script at approximately line 18. Search for a line that looks like this:

    $MYSQL     = '/usr/local/bin/mysql';    # path to mysql executable

    Change the path to reflect the location where mysql actually is stored on your system. If you do not do this, a Broken pipe error will occur when you run mysqlaccess.

After everything has been unpacked and installed, you should test your distribution. To start the MySQL server, use the following command:

shell> bin/mysqld_safe --user=mysql &

If you run the command as root, you must use th

e --user option as shown. The value of the option is the name of the login account that you created in the first step to use for running the server. If you run the command while logged in as mysql, you can omit the --user option.

If the command fails immediately and prints mysqld ended, you can find some information in the host_name.err file in the data directory.

More information about mysqld_safe is given in Section 4.3.2, 「mysqld_safe — MySQL Server Startup Script」.

Note

The accounts that are listed in the MySQL grant tables initially have no passwords. After starting the server, you should set up passwords for them using the instructions in Section 2.17, 「Post-Installation Setup and Testing」.


Set the MySql autorun in Fedora



















2008年10月21日 星期二

Install ioncube loader for atmail server test ver for linux

[ wrote from http://www.ioncube.com/loader_installation.php ]

Installation on a Unix Server

If your PHP is not threaded you need a Loader called:

ioncube_loader__.so

If your PHP is threaded you need a Loader called:

ioncube_loader___ts.so

will be 'lin' for Intel Linux, 'fre' for FreeBSD, 'sun' for Sparc Solaris, 'ope' for OpenBSD, 'dar' for OSX and 'net' for NetBSD.

will be 4.0, 4.1, 4.2 or 4.3 - i.e the first 2 digits of your PHP version.

Edit your php.ini file and for non-threaded PHP add:

zend_extension = //ioncube_loader__.so

and for threaded PHP add:

zend_extension_ts = //ioncube_loader___ts.so

Replace and with whatever is right for your system, and with the path to where the Loader is installed, e.g. /usr/local/ioncube

If there are other zend_extension entries in the php.ini file place this new entry before the existing entries.

For example, with Linux running PHP 4.1.2 and Apache 1, you might add:

zend_extension = /usr/local/ioncube/ioncube_loader_lin_4.1.so

For FreeBSD running threaded PHP 4.3.1 with Apache 2, you might add:

zend_extension_ts = /usr/local/ioncube/ioncube_loader_fre_4.3_ts.so