Back to top

# Todo notes
hostname FQDN setup / DNS

# Needed Build Tools
sudo yum install gcc-c++
sudo yum install epel-release -y
yum -y install centos-release-scl.noarch
# check version gcc -version :

############################
# Firewall
#
Opening ports on RHEL or CentOS

> firewall-cmd --state
running
> firewall-cmd --get-active-zones
public
interfaces: eth0
Open Services
> firewall-cmd --zone=public --permanent --add-service=http
> firewall-cmd --zone=public --permanent --add-service=https
> firewall-cmd --reload
> sudo firewall-cmd --add-port 8500/tcp --permanent

############################
# Local Database MySQL | MariaDB
sudo yum install mariadb-server
sudo systemctl start mariadb sudo
systemctl enable mariadb
sudo mysql_secure_installation

#Supporting UTF8MB4 (emoji)

:alien::alien::alien::alien::alien::alien::alien:

#RE: ERROR 2006 (HY000): MySQL server has gone away
#RE: Specified key was too long; max key length is 767 bytes
Ensure /etc/my.cnf
[mysqld]
innodb_large_prefix=true
innodb_file_format=barracuda
innodb_file_per_table=true
max_allowed_packet=64M

### Helper Script
cat create_database_helper.sh
#!/bin/bash
newUser='db_admin'
newDbPassword=''
newDb='db_name'
host=localhost
#host='%'
commands="CREATE DATABASE \`${newDb}\`;
CREATE USER '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';
GRANT USAGE ON *.* TO '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';
GRANT ALL privileges ON \`${newDb}\`.*
TO '${newUser}'@'${host}';FLUSH PRIVILEGES;"
echo "${commands}" | /usr/bin/mysql -u root -p

Installing PHP 7.x on CentOS 7.x
SEE: https://wiki.centos.org/HowTos/php7
yum -y install centos-release-scl.noarch

#########################
# Compile PHP Notes
#
# https://blacksaildivision.com/php-install-from-source

./configure --prefix=/usr/local/php --enable-fpm --disable-short-tags --with-openssl --with-pcre-regex --with-pcre-jit --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --enable-exif --with-gd --enable-intl --enable-mbstring --with-mysqli --enable-pcntl --with-pdo-mysql --enable-soap --enable-sockets --with-xmlrpc --enable-zip --with-webp-dir --with-jpeg-dir --with-png-dir

configure: error: Package requirements (sqlite3 > 3.7.4) were not met:
No package 'sqlite3' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables SQLITE_CFLAGS
and SQLITE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

################
# Compile Apache Notes

"The APR based Apache Tomcat Native library which
allows optimal performance in production environments
was not found on the java.library.path"

# APR ( Apache Portable Runtime) setup source code in Apache source.
# checkout to Apache src/lib
APT can be grabbed from Subversion | yum install subversion
sudo svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr

./configure --enable-ssl --enable-so --enable-http2 --with-mpm=event --with-included-apr
"checking whether to enable mod_http2... configure: error: mod_http2 has been requested but can not be built due to prerequisite failures"
yum install libnghttp2-devel

/opt/var/scripts/software/httpd-2.4.43/support/ab.c:575: undefined reference to `SSL_in_init'
ab.o: In function `ssl_print_cert_info': Openssl Libdir in configure (using LDFLAGS env var

CPPFLAGS="-I/usr/local/include/openssl/" LDFLAGS="-L/opt/openssl/lib"
./configure --prefix=/usr/local/dovecot

Libraries have been installed in: /usr/local/dovecot/lib/dovecot

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'

PHP Build Notes
CPPFLAGS="-I/usr/local/include/openssl/"
LDFLAGS="-L/opt/openssl/lib"
./configure
--with-apxs=/usr/local/apache2/bin/apxs
--with-mysql=/usr/local/
--with-gd=/usr/local/
--with-freetype
--with-ima=/usr/local/dovecot/
--with-ssl=/usr/local/openssl
--prefix=/usr/local/apache2

################################
# Cold Fusion Notes
#

Note: To configure a webserver on this computer, post install, launch the
WSConfig tool available at /opt/coldfusion2018/cfusion/runtime/bin/

Built-in Web Server Port Number
-------------------------------
The Adobe ColdFusion 2018 Built-in Web Server will be configured to use port
8500. You can also specify a different port.
Built-in Web Server Port Number (DEFAULT: 8500):
Performance Monitoring Toolset
------------------------------

Enter the hostname / DNS of the ColdFusion server. Ensure that the hostname /
DNS is accessible from the machine where Performance Monitoring Toolset is
installed.

You can always change the values later in the ColdFusion Administrator >
Performance Monitoring Toolset.
Hostname / IPAddress (Default: HOSTNAME-HERE ):

You have successfully completed the first step in installing Adobe ColdFusion 2018.
To continue with your installation, go to /opt/coldfusion2018/cfusion/bin and
type "./coldfusion start" to start your server.

Once the server is started, log in to the Configuration Wizard at
http://127.0.0.1:8500/CFIDE/administrator/index.cfm.
03/31 18:06:23 INFO Macromedia Flex Build: 87315.134646
Mar 31, 2020 18:06:36 PM Error [Thread-9] -
Read timed out http://127.0.0.1:8991/PDFgServlet/

Apache -> Tomcat Fast CGI # Cold Fusion | Lucee Build
mod_jk // Setting up Tomcat Connectors
sudo yum -y install httpd-devel
https://mirrors.ocf.berkeley.edu/apache/tomcat/tomcat-connectors/jk/tomc...
cd native/
./configure --with-apxs=/usr/sbin/apxs
make; make install;
CF Configure Apace | Example config for mod_jk In httpd.conf:
LoadModule jk_module modules/mod_jk.so
...
JkWorkersFile conf.d/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug
In vhost: JkMount /* worker1
See Tomcat files from Cold Fusion Install: /opt/coldfusion2018/cfusion/runtime/lib/

Rando Note CF2016 and CF2018 uses different ports
coldfusion2016/cfusion/runtime/conf/server.xml
coldfusion2018/cfusion/runtime/conf/server.xml

# Cold Fusion configure ColdFusion Adobe Connector
# Tomcat Connector
sudo ./wsconfig -ws Apache -bin /usr/sbin/httpd -script /usr/sbin/apachectl -dir /etc/httpd/conf/ -v

RE "The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path" ...
sudo yum install tomcat-native.x86_64

!!! MySQL Community Server are not supported
MySQL MariaDB Cold Fusion Data Sources - Additional Steps Needed
Connection verification failed for data source: snowmaid-laboartory
java.sql.SQLException: [Macromedia][MySQL JDBC Driver]Connections to MySQL Community Server are not supported. Please contact MySQL to obtain a MySQL Enterprise or Commercial version.
The root cause was that: java.sql.SQLException: [Macromedia][MySQL JDBC Driver]Connections to MySQL Community Server are not supported. Please contact MySQL to obtain a MySQL Enterprise or Commercial version.

FIX :
- download the JDBC driver JDBC Driver for MySQL (Connector/J) here: http://dev.mysql.com/downloads/connector/j/.
- in the Platform select box, choose platform independentnext, choose the tar
- extract "mysql-connector-java-XXX-bin.jar" and put it in the lib directory of your CF install.
See CF install location : cfusion\lib
restart ColdFusion and validate your datasource in the ColdFusion Administrator.
rebuild connector using MYSQL 5 driver

####################
# Random Related Links

Sampe ColdFusion calendar
https://github.com/bennadel/Kinky-Calendar

Sample PHP calendar s
https://phppot.com/php/php-calendar-event-management-using-fullcalendar-...

# Drupal 8 apache:apache +w permissions
# Needed for SELinux
sudo chcon -R -t httpd_sys_content_rw_t /var/www/html/sites/
sudo chcon -R -t httpd_sys_content_rw_t /var/www/html/sites/

# CentOS 6
$ mysql --version
mysql Ver 15.1 Distrib 5.5.64-MariaDB, for Linux (x86_64) using readline 5.1

https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors
php -r "echo ini_get('memory_limit').PHP_EOL;"
php --ini | grep php.ini