Skip to main content

Note on custom build legacy php, apache CentOS

https://stackoverflow.com/questions/979453/how-can-i-use-aliased-commands-with-xargs/979504
find -name \*bar\* | xargs bash -ic gi foo

It seem use bash function is easier.

I remember that I've create some function like this before, it look like this:

#DIRECTORY=$1
FILETYPE = $1
KEYWORD = $2

find . -name "*.FILETYPE" | xargs grep -rni KEYWORD $1
...

https://serverfault.com/questions/421161/how-to-configure-vsftpd-to-work-with-passive-mode

https://www.yanxurui.cc/posts/server/2017-03-21-NGINX-as-a-file-server/

https://serverfault.com/questions/807074/enable-password-login-for-sftp-while-keeping-authentication-by-ssh-keys

...
PasswordAuthentication no
...
Match user drupalsftp
    PasswordAuthentication yes



PasswordAuthentication no
...
Match user drupalsftp address 10.1.2.3/32
    PasswordAuthentication yes
    # also since we want only sftp
    ForceCommand internal-sftp


Err
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 178, in main
...
yum clean metadata
yum clean all
yum update

=> Oh simple disable fastestmirror
/etc/yum/pluginconf.d/fastestmirror.conf

http://archive.kernel.org/centos-vault/5.11/isos/i386/

In order to conserve the limited bandwidth available .iso images are not downloadable from this Vault Machine.

The Following external Vault mirrors (not monitored by the CentOS Infra team !) provide direct downloads for all content, including isos:

USA:
http://archive.kernel.org/centos-vault/
rsync://archive.kernel.org::centos-vault/

Europe:
http://mirror.nsc.liu.se/centos-store/
rsync://mirror.nsc.liu.se::centos-store/


http://phpseclib.sourceforge.net/
use SFTP lib. it seem weird but have smth to learn like super compatible by absorb mcrypt available or not.

./configure --with-libdir=lib64 --with-apxs2=/usr/local/apache/bin/apxs --without-mysql --with-pgsql --enable-sigchild --enable-mbstring --enable-mbregex --enable-bcmath --with-mcrypt --enable-sockets --with-zlib --with-openssl
[--enable-ftp --with-curl] additon

Note that --with-libdir=lib64 since I mistaked use x64 version, it should be i386 instead.
uname -a to get

Enable curl without installing seem cool, not sure it work
https://serverfault.com/questions/437472/post-compiled-php-5-4-curl-installation

Restart apache after rebuild php, seem err
httpd: Syntax error on line 55 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: undefined symbol: SSL_CTX_set_options

https://stackoverflow.com/questions/2385735/php-error-libphp5-so-undefined-symbol-estrndup

Nothing but some useful apachectl command
https://stackoverflow.com/questions/27152943/how-can-i-view-the-complete-httpd-configuration
apachectl -S
show vhost...

apachectl -M

Yeah it seem configure httpd ly here
[root@goonetexchangedevel01 httpd-2.2.14]# cat config.nice
#! /bin/sh
#
# Created by configure

"./configure" \
"--prefix=/usr/local/apache" \
"--with-layout=Apache" \
"--enable-so" \
"--with-mpm=prefork" \
"--enable-headers" \
"--enable-rewrite" \
"--enable-ssl" \
"$@"

php52  -i |grep "Configure "
or php -i |grep "Configure"


https://tomthorp.me/blog/installing-custom-openssl-and-curl-legacy-php

Centos 5.11 have php5.3 and 5.1.6 (default ?). Try use 5.3
https://www.centos.org/forums/viewtopic.php?f=20&t=21793&sid=8ed638262f98f7e86c71129c56a35f8f&start=10


Vim disable new end of line  noeol.
With vim 7.4+ it seem can be setup on vimrc. Unfortunately my vim 7.0 too old so I have to make some more step.
vim -b file
:set noeol
:wq

A bit panic but complex setup seem not worth here.

It seem NAT only work with port forwarding as in PWG time.
http://ask.xmodulo.com/access-nat-guest-from-host-virtualbox.html
Use NAT + hostonly for 2 way access. Only way beside Bridged ?


GIT middle man push error
remote: error: refusing to update checked out branch: refs/heads/BR_2019-41
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To /root/cent/goo-net-exchange
 ! [remote rejected] BR_2019-41 -> BR_2019-41 (branch is currently checked out)
error: failed to push some refs to '/root/cent/project-one'

 => Simple switch branch on remote (middleman Git dir). For me it is host Windows repo dir.
I pushed from guest ancient CentOS.

git co another-branch (host)
git push origin br-xxx (guest)
:)



yeah fuking yum
https://www.liquidweb.com/kb/enable-epel-repository/
https://archive.fedoraproject.org/pub/archive/epel/


https://serverfault.com/questions/437472/post-compiled-php-5-4-curl-installation

 

Comments