Dec 30 2011
Mikrotik 29.27 bisa buat percobaan setelah itu Beli versi licency
Comments Off on Mikrotik 29.27 bisa buat percobaan setelah itu Beli versi licency
Dec 30 2011
Comments Off on Mikrotik 29.27 bisa buat percobaan setelah itu Beli versi licency
Dec 19 2011
FreeBSD virtualmin install with suexec issue @ problem
I’m installing FreeBSD 8.1-release with:
apache-2.2.17_1
webmin-1.520
virtualmin-3.80
u’ll face some stupid errors like:
The Suexec command on your system is configured to only run scripts under /usr/local/www/data, but the Virtualmin base directory is /usr/home. CGI and PHP scripts run as domain owners will not be executed. .. your system is not ready for use by Virtualmin.
Solutions:
during installation apache 2.2 via ports, one file will be make as make options, edit it:
ee /var/db/ports/apache22/options
make sure the files have suexec options compiled in:
WITH_SUEXEC=true
anyway suexec by default will point to default webroot path only, change it to ( your virtualmin path ) and u need to add it manually:
SUEXEC_DOCROOT=/usr/home
save and recompile+compile+install your apache again
cd /usr/ports/www/apache22
make install clean
edit your httpd.conf to include suexec module..
LoadModule suexec_module libexec/apache22/mod_suexec.so
save and restart your apache..
DONE!!!
Referensi http://trunasuci.pbworks.com/w/page/32558556/FreeBSD%20Virtualmin%20suexec%20issue
Comments Off on FreeBSD Virtualmin suexec issue
Dec 14 2011
Install Webserver Di FREEBSD 7.3 dengan port
Pertama sebelum masuk ke Webserver kalo saya mending install wget dulu
angga#cd /usr/ports/ftp/wget make install clean
ketika muncul config bebas mana yang di centang
Setelah selesai baru dibawah ini
Install Database MySQL
angga# cd /usr/ports/databases/mysql51-server
angga# make
angga# make install
angga# make clean
Sebelum menjalankan MySQL untuk yang pertama kali, kita jalankan dulu :
angga#/usr/local/bin/mysql_install_db
angga#chown -R mysql:mysql /var/db/mysql
Jalankan MySQL dengan perintah:
angga# /usr/local/bin/mysqld_safe &
Jika sudah selesai silahkan edit /etc/make.conf :
angga# ee /etc/make.conf
Tambahkan dua baris berikut:
WITH_BDB_VER=51
WITH_MYSQL_VER=51
“PASTIKAN DUA BARIS TERSEBUT SESUAI DENGAN VERSI MYSQL YANG SAHABAT GUNAKAN”
Tekan enter untuk keluar dari editor dan pastikan pilih save changes.
Install Apache13 + ModSSL
angga# cd /usr/ports/www/apache13-modssl
angga# make
angga# make certificate
Pada langkah ini sahabat akan diminta untuk mengisi atau menjawab hal-hal yang dibutuhkan, silahkan pilih [R]SA server key untuk performa yang bagus, ubah data yang desesuaikan dengan data sahabat, ketika ditanya want to encrypt this key ? pilih saja [N]o, kemudian ikuti langkah berikut:
angga# make install
angga# make clean
Install PHP
angga# cd /usr/ports/lang/php5
angga# make
angga# make install
angga# make clean
Install PHP Extensions
angga# cd /usr/ports/lang/php5-extensions
angga# make
Pada tahap ini kita diminta untuk memilih extensi PHP yang sekiranya kita butuhkan silahkan di pilih/centang, proses compile akan memakan waktu cukup lama, tergantung extensi yang kita pilih tadi dan tergantung keceptan internet yang kita gunakan. Setelah beres prosesnya:
angga# make install
angga# make clean
Untuk memastikan web server yang baru saja kita install bisa menangani PHP:
Tambahkan baris berikut:
#————————————————–
AddType application/x-httpd-php .php
#————————————————–
Supaya Apache dan MySQL jalan otomatis ketika mesin FreeBSD dinyalakan, edit /etc/rc.conf:
angga# ee /etc/rc.conf
tambahkan baris berikut:
mysql_enable=”YES”
apache_enable=”YES”
tekan Esc untuk keluar dari editor dan pilih save changes, setelah itu restart FreeBSD kita;
angga# reboot
Jangan lupa untuk menambahkan password untuk root MySQL:
angga# mysqladmin -u root password password-sahabat-disini
Ini adalah tulisan saya bulan Maret 2009, Semoga bisa membantu bagi yang belum tahu, bagi sang ahli apabila ada yang salah tolong dikoreksi.
We assume you already have Freebsd 7 OS with MYSQL PHP and Apache installed on it.
1. Create Postfix DB
Login into your server and su with root access.
#mysql -u root -p
#create database postfix;
#GRANT ALL PRIVILEGES ON postfix.* TO ‘postfix’@’localhost’ IDENTIFIED BY ‘yourpostfixpassword’ WITH GRANT OPTION;
#flush privileges;
#exit
From mysql command above, we have created postfix db, with postfix user and yourpostfixpassword as db password.
2. Install Cyrus-SASL
Login into your server and su with root access.
#/usr/ports/security/cyrus-sasl2
#make config
Please kindly to take a look a capture screen below :
You need to make sure MYSQL, LOGIN and PLAIN is ticked/checked.
#make install clean
This will automatically install any dependency like MYSQL, OpenSSL.. etc.. leave it untouch and wait until the installation finished.
3. Install Postfix
#/usr/ports/mail/postfix
#make config
Please kindly to take a look a capture screen below :
You need to make sure PCRE, MYSQL,SASL2,TLS
#make install clean
This will automatically install any dependency like PCRE, MYSQL, Cyrus-SASL2, OpenSSL.. etc.. leave it untouch and wait until the installation finished.
3.1 Generate SSL for postfix
#cd /etc/ssl
#openssl req -new -x509 -nodes -out smtpd.pem -keyout smtpd.pem -days 3650
This will create smtpd.pem in /etc/ssl
3.2 Modify postix main.cf
## Add few lines below in the end of main.cf
virtual_alias_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:125
virtual_mailbox_base = /var/vmail/
virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 112400000
virtual_mailbox_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 125
virtual_transport = virtual
virtual_uid_maps = static:125
alias_maps = mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
#====================SASL========================
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_unknown_sender_domain,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
reject_unauth_destination,
permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner=$myhostname ESMTP “rainforest.neorack.com”
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/ssl/smtpd.pem
smtpd_tls_cert_file = /etc/ssl/smtpd.pem
smtpd_tls_CAfile = /etc/ssl/smtpd.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
3.3 Create All *.cf files in /usr/local/etc/postfix
#cd /usr/local/etc/postfix
#pico mysql_virtual_alias_maps.cf
user = postfix
password = yourpostfixpassword
hosts = localhost
dbname = postfix
query = SELECT goto FROM alias WHERE address=’%s’ AND active = ‘1’
#pico mysql_virtual_domains_maps.cf
user = postfix
password = yourpostfixpassword
hosts = localhost
dbname = postfix
query = SELECT domain FROM domain WHERE domain=’%s’ AND active = ‘1’
#pico mysql_virtual_mailbox_maps.cf
user = postfix
password = yourpostfixpassword
hosts = localhost
dbname = postfix
query = SELECT maildir FROM mailbox WHERE username=’%s’ AND active = ‘1’
3.4 Create VMAIL directory
#cd /var
#mkdir vmail
#chown -R postfix:postfix vmail
4 Install Courier-Authlib and SMTP AUTH
#cd /usr/ports/security/courier-authlib
Please kindly to take a look a capture screen below
You need to make sure Ticked AUTH_MYSQL
#make install clean
This will automatically install any dependency like MYSQL.. leave it untouched until finished.
4.1 Edit authdaemonrc
#cd /usr/local/etc/authlib
#mv authdaemonrc authdaemonrc-ori
#pico authdaemonrc
## uncomment this line below and edit this line to :
authmodulelist=”authmysql”
4.2 Edit authmysqlrc
#cd /usr/local/etc/authlib
#mv authmysqlrc authmysqlrc-ori
Before you edit authmysqlrc, please check your postfix UID and GID.
#id postfix
uid=125(postfix) gid=125(postfix) groups=125(postfix),6(mail)
We will need postfix UID and GID in authmysqlrc config file below
#pico authmysqlrc
## Edit and change the sql user,db and password as needed
MYSQL_SERVER localhost
MYSQL_USERNAME postfix
MYSQL_PASSWORD yourpostfixpassword
MYSQL_SOCKET /tmp/mysql.sock
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD ‘125’
MYSQL_GID_FIELD ‘125’
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD ‘/var/vmail’
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD maildir
4.3 Setting SMTP AUTH
#cd /usr/local/lib/sasl2
#pico smtpd.conf
pwcheck_method: authdaemond
log_level: 3
mech_list: PLAIN LOGIN
authdaemond_path:/var/run/authdaemond/socket
4.4 Change authdaemond_path permission
#chown -R postfix:postfix /var/run/authdaemond/
5. Install Courier-Imap
#cd /usr/ports/mail/courier-imap
#make config
Please kindly to take a look a capture screen below,
Make sure you have ticked a AUTH_MYSQL
#make install clean
It will automatically install any dependency like MYSQL.. leave it untouched until installation finished.
5.1 Edit imapd, imapd-ssl, pop3d and pop3d-ssl
#cd /usr/local/etc/courier-imap
#cp pop3d.dist pop3d
#pico pop3d
## edit these line below to :
POP3AUTH=”PLAIN LOGIN”
POP3AUTH_TLS=”PLAIN LOGIN”
POP3DSTART=YES
## leave other options untouched
#cp imapd.dist imapd
#pico imapd
## change this line below to :
IMAPDSTART=YES
## leave other options untouched
#cp pop3d-ssl.dist pop3d-ssl
#pico pop3d-ssl
## change these line below to :
POP3DSSLSTART=YES
POP3_STARTTLS=NO
TLS_CERTFILE=/etc/ssl/smtpd.pem
## leave other options untouched
#cp imapd-ssl.dist imapd-ssl
#pico imapd-ssl
## change these line below to :
IMAPDSSLSTART=YES
IMAPDSTARTTLS=NO
TLS_CERTFILE=/etc/ssl/smtpd.pem
## leave other options untouched
6. Install Postfixadmin
#cd /usr/ports/mail/postfixadmin
#make config
Please kindly to take a look a capture screen below:
Please make sure you ticked a MYSQL
#make install clean
It will automatically install any dependency such as MYSQL etc.. please leave it untouched until finished.
6.1 Edit postfix admin config file
#cp -R /usr/local/www/postfixadmin /var/www/html/postfixadmin
#cd /var/www/html/postfixadmin
Find file config.inc.php.dist or config.inc.php-dist rename it to config.inc.php
#pico config.inc.php
## edit few lines below to :
$CONF[‘configured’] = true;
$CONF[‘postfix_admin_url’] = ‘http://10.10.10.10/postfixadmin’; ## change it to your ip address/website
$CONF[‘database_type’] = ‘mysql’;
$CONF[‘database_host’] = ‘localhost’;
$CONF[‘database_user’] = ‘postfix’;
$CONF[‘database_password’] = ‘yourpostfixpassword’;
$CONF[‘database_name’] = ‘postfix’;
$CONF[‘database_prefix’] = ”;[/code]
You can access postfixadmin from browser. Example :http://10.10.10.10/postfixadmin/setup.php
After you have access the url above. you will generate a admin password for postfix. example your admin password is : testing123
you will receive a line like below, this is a HASH password for testing123:
$CONF[‘setup_password’] = ‘e457ce0976f66096b69267f5103b62e0:712a40a9bd487e5fde6e1c6014f25’
Next, you need to edit config.inc.php again>
#pico config.inc.php
### fine $CONF[‘setup_password’] ###
Change it like below :
$CONF[‘setup_password’] = ‘e457ce0976f66096b69267f5103b62e0:712a40a9bd487e5fde6e1c6014f25’
### save this file ###
So you can start create a postmaster account to manage all your virtual domains and virtual mailbox
From this url http://10.10.10.10/postfixadmin/setup.php
Input your setup admin password example : testing123
Input your master email or master admin email example : postmaster@testing.com
Inpur your master email or master admin email password example ; test123
After you have finished created a postmaster account / master admin email account.
you can login via this url http://10.10.10.10/postfixadmin/ to create a domain and virtual email account.
7. Install Squirrelmail Webmail
#cd /usr/ports/mail/squirrelmail
#make install clean
7.1 Configure Squirrelmail
#cp -R /usr/local/www/squirrelmail /var/www/html/webmail
#cd /var/www/html/webmail/config
#./conf.pl
type option 2
type option A
type option 6 for auth type “login”
type option 8 and type courier
type option B
type option 7 for smtp auth “login”
type S to save
type Q to quit
You can access your webmail from http://10.10.10.10/webmail, Change it into your website url/ your server ip address.
7.2 Install Courierpassd
#cd /usr/ports/security/courierpassd
#make install clean
7.3 Install Courierpassd in Inetd.conf
#pico /etc/inetd.conf
## add this line in the end of the config file
courierpassd stream tcp nowait root /usr/local/sbin/courierpassd courierpassd -s imap
#pico /etc/services
## add this line in the end of the config file
courierpassd 106/tcp #for courierpassd
8. Configure all Services in rc.conf and rc.local
#pico /etc/rc.conf
postfix_enable=”YES”
courier_authdaemond_enable=”YES”
courier_imap_imapd_enable=”YES”
courier_imap_pop3d_enable=”YES”
courier_imap_imapd_ssl_enable=”YES”
courier_imap_pop3d_ssl_enable=”YES”
inetd_enable=”YES”
#pico /etc/rc.local
/usr/local/bin/mysqld_safe –user=mysql &
8.1 Starting all Services and daemon
#/usr/local/sbin/postfix start
postfix/postfix-script: starting the Postfix mail system
#/usr/src/etc/rc.d/inetd restart
Starting inetd.
#/usr/local/etc/rc.d/courier-authdaemond start
Starting courier_authdaemond.
#/usr/local/etc/rc.d/courier-imap-imapd start
Starting courier-imap-imapd.
#/usr/local/etc/rc.d/courier-imap-imapd-ssl start
Starting courier-imap-imapd-ssl.
#/usr/local/etc/rc.d/courier-imap-pop3d start
Starting courier-imap-pop3d.
#/usr/local/etc/rc.d/courier-imap-pop3d-ssl start
Starting courier-imap-pop3d-ssl.
Dapet dari
http://faruqafif.student.fkip.uns.ac.id/2009/07/29/install-apache-php-mysql-di-freebsd-71/
Comments Off on Install Mail Server dengan Postfix with Mysql di FreeBsd 7.3
Dec 05 2011
Secara default, jika kita install mysql server via port maka data-data dari database yang ada dalam mysql server akan tersimpan pada dir /var/db/mysql
Akan merepotkan kalau ternyata partisi /var kita terlalu kecil, sehingga data nambah sedikit aja partisi /var udah penuh.
Ada 2 cara untuk mensiasati hal tsb,
pertama ada merubah letak data directory pada file konfigurasi mysql kita my.cnf.
Hal ini memerlukan perubahan pada file konfigurasi my.cnf
# ee /var/db/mysql/my.cnf
[mysqld]
datadir=/data/mysqlbaru
Create directory tempat data baru disimpan
# mkdir /data/mysqlbaru
merubah owner directory tsb menjadi milik mysql
#chown -R mysql:mysql /data/mysqlbaru
kemudian start mysql
# /usr/local/etc/rc.d/mysql-server start
Cara kedua adalah dengan memindah dan melakukan linking directory mysql.
Detailnya sbb :
matikan server :
# /usr/local/etc/rc.d/mysql-server stop
# cd /var/db
pindahkan directory data mysql ke directory baru yang kapasitasnya lebih lega :
# mv mysql /data
lakukan linking directory
# ln -s /data/mysql /var/db/mysql
start server :
# /usr/local/etc/rc.d/mysql-server start
Disadur dari http://www.indofreebsd.or.id/tips-and-trick/merubah-data-directory-pada-mysql-server-freebsd-server.html
Comments Off on Memindah Directory Default Mysql di Freebsd