Toggle navigation

Codiad Image Guide

Version 2.8.4

Websoft9 Codiad is a pre-configured, ready to run image for running Codiad on Alibaba Cloud.

Codiad is a web-based IDE framework with a small footprint and minimal requirements.Codiad was built with simplicity in mind, allowing for fast, interactive development without the massive overhead of some of the larger desktop editors. That being said even users of IDE’s such as Eclipse, NetBeans and Aptana are finding Codiad’s simplicity to be a huge benefit. While simplicity was key, we didn’t skimp on features and have a team of dedicated developer actively adding more.

Application Software(Dodiad2.8.4)
Software directory: /data/wwwroot/codiad

Application Server(PHP7.0,APACHE2.4)
PHP Configuration File: /etc/php/7.0/apache2/php.ini
Apache Vhost Configuration File: /etc/apache2/sites-available
Apache Log Files:/var/log/apache2

Database(MYSQL5.7)
Database install directory: /usr/share/mysql
Database data directory: /data/mysql
Database Configuration File: /etc/mysql/mysql.conf.d/mysqld.cnf
PhpMyAdmin install directory: /usr/share/phpmyadmin
Kown more from MySQL User Guide

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address/
  • If verify successfully,you can enter the Start Installation page of this Image
  • If no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

Using Chrome or Firefox to visit: http://Internet IP Address/ to start the application installation process.It is recommended to complete below step before the installation:

  • Domain resolution if you want to use (Add an A record to the Internet IP Address of Server from your Domain Control Panel)

Then access the installation page by domain directly and complete the installation wizard for the following steps:

  1. Visit http://Internet IP Address or http://yourdomain to enter the start page of installation
  2. Click the “Install” for the next step,then you will go to log in interface below
  3. Click the “Login” and Log in to backend of Dodiad below:

Three usernames and passwords are required for application installation, application using, andapplication maintenance:

1、ResourceSpace:Username and password is set by youself when installation,
Backend URL:http://Internet IP Address/
2、MySQL Database:Default username and password is root/123456,
Control Panel URL:http://Internet IP Address/phpmyadmin
3、Linux Server:Username is root,Password is set by youself when buying.You can reset the password through console and restart the Server if you have forgotten it.Please Using the Putty for Remote and WinSCP for SFTP

Dodiad plugins allow you to install additional features for your application. Go to the Administer->System->Marketplace,the page will automatically list the plugins management interface below

You can visit the marketplace page and download and place the plugin’s folder in (or git-clone into) the /plugins directory in Codiad. Then use the Plugins tool to enable the plugin.

Routine backup (archives) of the database and application setup is essential to ensure failover is smooth.

Backup is based on the server snapshot automatic backup and manual local backup in two ways, both of which have their own advantages and disadvantages, it is recommended to use together

Automatic Backup by Snapshot of Server

IaaS provider have the “snapshot” function for Server, the snapshot is for the server disk. Snapshot tool can record the specified point in time the hard disk data, all backed up, and can achieve a key recovery.

If you have an automatic snapshot of the disk settings, the following scenes you can be more calm face:

  • Work a few days of the results, was mistakenly deleted
  • Hackers damage your site
  • The content has been messed up

Done a snapshot backup, a key to restore to the backup point of time state. That is, on-site reduction, very good function.

Different cloud vendor snapshot settings slightly different, specific reference:

Manual Backup

You can use Manual Backup as following steps:

  1. Download the entire software directory(/data/wwwroot/codiad) by SFTP or other tools

Before upgrade you should put the site down for maintenance and always Backup your code, data and config files.

Codiad provide automatic upgrade interface,

  1. Login as Administator,then go to System->update check,the automatic upgrade is begin execution
  2. If update successfully, you can the message below

 

Websoft9 Mantis Image have installed the phpMyadmin

Following is the step for access phpMyadmin

  1. Open Chrome or Firefox on your local PC
  2. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page
  3. select you language,Username:root,Password:123456
  4. Click the button “Go”

You can use the command to manage the services for Server.Please choose the corresponding command mode according to different types of operating system

Ubuntu Linux

Apache http service

~# systemctl start httpd
~# systemctl stop httpd
~# systemctl restart httpd
~# systemctl reload apache2 #Configuration file

MySQL  service

~# systemctl start mysqld
~# systemctl stop mysqld
~# systemctl restart mysqld

Else

~# a2dismod ModuleName  #disable Apache2 module
~# a2enmod ModuleName    #enable Apache2 module
~# a2ensite Configuration      #enable vhost configuration
~# a2dissiteConfiguration      #disable vhost configuration

When install new extension from back-end it will not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow:
file 644,folder 755 ,Permissions Users and groups www-data
If there is a file permissions problem, execute the following three commands:

chown -R www-data.www-data /data/wwwroot/codiad
find /data/wwwroot/default/codiad -type d -exec chmod 755 {} \;
find /data/wwwroot/default/codiad -type f -exec chmod 644 {} \;

Modify the /etc/php/7.0/apache2/php.ini file to increase the allowed size for uploads:

; Maximum size of POST data that PHP will accept.
post_max_size = 16M
; Maximum allowed size for uploaded files.
upload_max_filesize = 16M

then,restart the apache

# systemctl restart httpd

The PHP configuration file allows you to configure the modules enabled, the email settings or the size of the upload files. It is located at /etc/php/7.0/apache2/php.ini.

There are some PHP settings that need to be sufficient to install.

e.g The values for PHP.ini below are suggested values only.

  • memory_limit – Minimum: 256M Recommended: 1G or better
  • upload_max_filesize – Minimum: 20M
  • post_max_size – Minimum: 20M
  • max_execution_time: At Least 120 Recommended: 300

After modifying the PHP configuration file, restart both Apache and PHP-FPM for the changes to take effect:

# systemctl restart httpd

If you receive the message “Maximum execution time of 30 seconds exceeded”.You may also like to extend the max_execution_time for PHP and you can modify it by two methods below

Method one: edit your /etc/php/7.0/apache2/php.ini


; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 90
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.

After modifying the PHP configuration file, restart both Apache and PHP-FPM for the changes to take effect:

# systemctl restart httpd

Method two: edit your .htaccess:

<IfModule mod_php5.c>
php_value max_execution_time 90
</IfModule>