Install all simple thing Apache PHP MySQL Mono Eclipse NetBean to work with Ubuntu for beginner

Some developer install Ubuntu to give it a try, but they do not know how to go further step, they will be bored and quit Ubuntu. I don’t like it (I like Ubuntu) so I make some simple steps that beginner (of Ubuntu) should do to play more (programming) with it:

Open your console (by opening menu Application/Accessories/Terminal), type some command:

Apache, good HTTP Web Server (it will take the lastest version of series 2)
sudo apt-get install apache2
(after installed, open http://localhost with your firefox  , if some text display, it’s work)
(the webroot folder is at /var/www by default)

MySQL, good DBMS
sudo apt-get install mysql-server
(when installing, it will ask you to make the root password of MySQL)
(after installed, type this command in the terminal: mysql
if the console become mysql> , it’s work)

PHP, good “script” web language
sudo apt-get install php5

PHPMyAdmin, good web management tool to control your MySQL Server
sudo apt-get install phpmyadmin
(after installed, you use it by going to http://localhost/phpmyadmin)

Mono runtime (CIL) is installed (by default) on Ubuntu, you only need to install MonoDevelop (IDE for coding) to work with C# on Ubuntu
sudo apt-get install monodevelop
(after installed, you open IDE by opening menu: Application/Programming/MonoDevelop)

Truetype font (because someone told me text look bad on Ubuntu)
sudo apt-get install msttcorefonts

SSH Server on Ubuntu, it will give you OS console remotely
sudo apt-get install openssh-server
/etc/init.d/ssh stop/start/restart


FTP Server, it will help you upload/download file to your OS remotely. I recommend using vsftpd. It is simple and quite secure FTP server. According to vsftpd man page:

vsftpd is the Very Secure File Transfer Protocol Daemon. The server can be launched via a super-server such as inetd or xinetd. Alternatively, vsftpd can be launched in standalone mode, in which case vsftpd itself will listen on the network.

Default ftp port : 21
Default configuration file : /etc/vsftpd.conf
Install by sudo apt-get install vsftpd
Cần chú ý chỉnh những tham số sau trong file config của nó:
listen=YES
anonymous_enable=NO
local_enable=YES (cho phép các account ubuntu sử dụng FTP, nên bật)
write_enable=YES (cho phép các loại lệnh ghi FTP, vì ta sẽ không cho anonymous user nên bật write_enable sẽ đơn giản hoá việc tạo file, folder)
local_umask=022 (nên đặt ở 022, các file sẽ mặc định có quyền 755)

Để nguyên các dòng comment sau để không cho anonymous access
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES

Chỉnh lại dòng ftpd_banner theo ý bạn, để chào mừng user khi họ login vào hệ thống. Tuy nhiên không nên giới thiệu quá nhiều về hệ thống (tránh lộ các thông tin nhạy cảm), chỉ nên điền vài thông tin cơ bản để biết được là mình đang connect đúng vào server của mình

4 thoughts on “Install all simple thing Apache PHP MySQL Mono Eclipse NetBean to work with Ubuntu for beginner

  1. Some other thing you need to know to avoid annoy problem

    1. if you modify some important config file, you must use root account. There is convennience way: type
    sudo nautilus in terminal, and find the config file, edit it as you need.

    2. you should (I think “you must”) change some config to work with unicode UTF-8, it will save your time:

    open /etc/apache2/apache2.conf
    find these words, change it value (eg: find ServerTokens, change to Prod)
    ServerTokens Prod
    ServerSignature Off

    open /etc/apache2/conf.d/charset
    AddDefaultCharset UTF-8 (uncomment this line)

    open /etc/mysql/my.cnf
    add these lines under [mysqld]
    # LockeVN says: set charset of MySQL default to utf-8, set MySQL do not automatic change the charset (due to client set charset command).
    default-character-set=utf8
    skip-character-set-client-handshake

    open /etc/php5/apache2/php.ini
    short_open_tag = Off
    expose_php = Off
    ; HACK lockevn, enable and change to utf-8
    default_charset = “utf-8”
    ; Allow or prevent reconnect
    ; HACK: LockeVN turn it on, default is off
    mysqli.reconnect = On

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s